Paiza Run Shortcut

You can run the code by using Ctrl + Enter in paiza.io

  1. // ==UserScript==
  2. // @name Paiza Run Shortcut
  3. // @name:ja Paiza.io実行ショートカット
  4. // @namespace https://greasyfork.org/ja/users/570127
  5. // @version 0.1.1
  6. // @description You can run the code by using Ctrl + Enter in paiza.io
  7. // @description:ja paiza.ioの画面全体でCtrl+Enterを用い実行できます。
  8. // @author universato
  9. // @grant none
  10. // @match https://paiza.io/projects/*
  11. // @license MIT
  12. // @supportURL https://twitter.com/universato
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. document.addEventListener('keydown', function (event) {
  17. if ((event.ctrlKey || event.metaKey) && event.key === 'Enter'){
  18. document.querySelector('.submit-button').click();
  19. }
  20. });
  21. })();