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

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@klye·
0.000 HBD
Steemit.com Mod: Ctrl + S to Post v0.0.2 (Revised)
<center>![](https://steemitimages.com/DQmegYmNRbc7wwDwJ2TxmrUAkv34owh1s1LEJvVR8HANbFo/image.png)</center>

If you're anything like me the most natural way to save a file or your work is the handy dandy <code>ctrl + s</code> 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!

<center><h1>How it Works, Installation and Code</h1></center>

By using the chrome / firefox plugin [Tampermonkey](https://www.google.ca/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwiLzqfeuebUAhVC44MKHfk9CpsQFggoMAA&url=https%3A%2F%2Fchrome.google.com%2Fwebstore%2Fdetail%2Ftampermonkey%2Fdhdgffkkebhmkfjojejmpbldmpobfkfo%3Fhl%3Den&usg=AFQjCNH4m9IkKXa8qEs7FQV7Fiv08bFjLA)(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](https://steemit.com/steemdev/@klye/steemit-floatvote-klye-edition-never-scroll-to-the-post-bottom-again)" 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);

```
<br>
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.. 


<hr>

| &nbsp; &nbsp; https://steemitimages.com/200x200/http://puu.sh/rRLx4/cb96668c43.png | <center> <h4>VOTE @KLYE FOR WITNESS </h4><b><a href="https://steemit.com/~witnesses">steemit.com/~witnesses</a></b> </center> | &nbsp; &nbsp; https://steemitimages.com/200x200/http://puu.sh/rRLx4/cb96668c43.png |
|------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|
👍 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,