Pastebin CTRL+S in Editor

Allows CTRL+S to update the script.

Mint 2015.01.15.. Lásd a legutóbbi verzió

  1. // ==UserScript==
  2. // @name Pastebin CTRL+S in Editor
  3. // @version 1.0.0
  4. // @description Allows CTRL+S to update the script.
  5. // @author celliott1997
  6. // @match http*://*pastebin.com/*
  7. // @grant none
  8. // @namespace https://greatest.deepsurf.us/users/8398
  9. // ==/UserScript==
  10.  
  11. $(document).ready(function(){
  12. var TextArea = $("textarea#paste_code");
  13. var SubmitBtn = $("input.button1.btnbold[type='submit']");
  14. if (TextArea.length && SubmitBtn.length){
  15. $(document).keydown(function(evt){
  16. if (evt.ctrlKey && (evt.which == 83)){
  17. evt.preventDefault();
  18. SubmitBtn.click();
  19. };
  20. });
  21. };
  22. });