Steemit.com Mod: Ctrl + S to Post v0.0.2 (Revised)

in #steemit7 years ago (edited)

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 WITNESS

steemit.com/~witnesses
   
Sort:  

Cool idea! Great to see these cool things you are making with Tamper Monkey.

Lots of possibilities and ideas opened up when I started tinkering with tampermonkey!

Finally !! Thank you for making it easier for us

You're welcome lovely!

That's a cool way to make everyone's lives easier.

A simple change that could make a big difference. Thank you!

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!

Nice. Now how about an rm * ran from root with the ctrl+r hot key

Lmao!

That would be hilarious but I'd probably lose sleep if someone actually ran that and borked their box. :/

Banner
@reggaemuffin got you a 100.0% @minnowbooster upvote, nice!

Follow and upvote back guys

Please refrain from asking for follows on my post.. Thanks! :)

Oh okay, no problem for me.
Hope you are happy with to your arrogance. :)

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

Thanks for sharing @klye. So many smart people on board !

This community is full of high IQ individuals for sure! (myself excluded, I'm as smart as rock)

Thanks alot @KLYE . I am a chrome user but was wondering if this works on internet explorer too ?

No clue. IE is basically computer aids imho.

By using the chomeChrome / firefox plugin Tampermonkey(or equivalent) we're able to monitor the keyboard for key press input.

Good catch!

That's why I wrote about the Steemit beautyfier

Thanks for the time saving shortcut

You are most welcome!

I like the tweaks you're coming up with! Useful stuff.

Great code ! Sadly I'm on firefox, I might try to port it later :)

I'm using tampermonkey for firefox and @klye's floatvote works great, so I imagine this will too

The way looks cool and easy. @abdulawal39 followed you hoping you to Keep posting more useful things like this.