If you're anything like me the most natural way to save a file or your work is the handy dandy ctrl + s
shortcut. Nearly all programs use this to save your work and rather than fight with my self to reprogram my nature I decided to make a quick little Steemit.com mod!
How it Works, Installation and Code
By using the chrome / firefox plugin Tampermonkey(or equivalent) we're able to monitor the keyboard for key press input. By taking this input and blocking the browsers natural reaction we can implement our own.. In this case rather than saving the whole page we instruct your browser to click the "POST" button on the "https://steemit.com/submit.html" page!
To install this quick and easy script you first must install Tampermonkey (or Greasemonkey). For more in depth instructions on this please refer to my post "Steemit FloatVote: KLYE Edition" as it's got a pretty detailed walk through on how to accomplish this and I don't feel the need to repeat the steps here. When you've got Tampermoney set up make a new script and copy/paste the following code below:
// ==UserScript==
// @name Steemit Ctrl + S to Post
// @namespace https://Steemit.com/klye
// @version 0.0.2
// @description CTRL + S to save post!
// @author @KLYE
// @include https://steemit.com/submit.html
// @include http://steemit.com/submit.html
// @include http://steemit.com/*
// @include https://steemit.com/*
// @include http://*.steemit.com/*
// @include https://*.steemit.com/*
// @run-at document-start
// ==/UserScript==
document.addEventListener("keydown", function(e) {
if (e.keyCode == 83 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) {
e.preventDefault();
document.querySelectorAll("button[type='submit']")[0].click();
}
}, false);
This code was only tested in Google Chrome so I cannot say for certain that it works in other browsers! Hopefully someone else finds this as useful as I do. Improving work flow and adding extra features is a passion of mine here on Steemit when I'm not working on my other coding projects, glad to release them to my fellow STEEM network users!
v0.0.2 - Now MIGHT work on comments too..
VOTE @KLYE FOR WITNESSsteemit.com/~witnesses |
---|
Cool idea! Great to see these cool things you are making with Tamper Monkey.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Lots of possibilities and ideas opened up when I started tinkering with tampermonkey!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Finally !! Thank you for making it easier for us
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
You're welcome lovely!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
That's a cool way to make everyone's lives easier.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
A simple change that could make a big difference. Thank you!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
No problemo sir! I'll be making more Steemit.com mod in the future seeing as how people seem to really be liking the functions and tweaks I'm bringing to the table!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Nice. Now how about an rm * ran from root with the ctrl+r hot key
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Lmao!
That would be hilarious but I'd probably lose sleep if someone actually ran that and borked their box. :/
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
@reggaemuffin got you a 100.0% @minnowbooster upvote, nice!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thanks @reggaemuffin!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Follow and upvote back guys
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Please refrain from asking for follows on my post.. Thanks! :)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Oh okay, no problem for me.
Hope you are happy with to your arrogance. :)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
It's not arrogance it's common courtesy! :D
I'm not upset with you for the record, but some people may flag you if you're asking for follows or posting links on their articles. <3
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thanks alot @KLYE . I am a chrome user but was wondering if this works on internet explorer too ?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
No clue. IE is basically computer aids imho.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thanks for sharing @klye. So many smart people on board !
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
This community is full of high IQ individuals for sure! (myself excluded, I'm as smart as rock)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Good catch!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
That's why I wrote about the Steemit beautyfier
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
test
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thanks for the time saving shortcut
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
You are most welcome!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
I like the tweaks you're coming up with! Useful stuff.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Great code ! Sadly I'm on firefox, I might try to port it later :)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
I'm using tampermonkey for firefox and @klye's floatvote works great, so I imagine this will too
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
The way looks cool and easy. @abdulawal39 followed you hoping you to Keep posting more useful things like this.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit