EveryNoise Scan Continue

press N to continue scanning on everynoise.com, instead of having to scroll up every time

目前为 2022-02-20 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name EveryNoise Scan Continue
  3. // @namespace https://alteregobot.me/
  4. // @description press N to continue scanning on everynoise.com, instead of having to scroll up every time
  5. // @author MissingNO123
  6. // @include https://everynoise.com/*
  7. // @version 1
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. // Inject a script tag into the document,
  12. // this is to call the scan() function from GM
  13. function exec(fn) {
  14. var script = document.createElement('script');
  15. script.setAttribute("type", "application/javascript");
  16. script.textContent = '(' + fn + ')();';
  17. document.body.appendChild(script); // run the script
  18. document.body.removeChild(script); // clean up
  19. }
  20.  
  21. document.addEventListener("keydown", Next);
  22.  
  23. function Next(e) {
  24. if (e.key == "n"){
  25. exec(function() {
  26. return scan("continue");
  27. });
  28. }
  29. }