Anti Spacebar Scroll [Sploop.io, Moomoo.io]

Removes scrolling when pressing spacebar

  1. // ==UserScript==
  2. // @name Anti Spacebar Scroll [Sploop.io, Moomoo.io]
  3. // @author Murka
  4. // @description Removes scrolling when pressing spacebar
  5. // @icon https://i.imgur.com/RigUeNF.png
  6. // @version 0.2
  7. // @match *://sploop.io/*
  8. // @match *://moomoo.io/*
  9. // @match *://*.moomoo.io/*
  10. // @run-at document-start
  11. // @grant none
  12. // @license MIT
  13. // @namespace https://gf.qytechs.cn/users/919633
  14. // ==/UserScript==
  15. /* jshint esversion:6 */
  16.  
  17. /*
  18. Author: Murka
  19. Github: https://github.com/Murka007
  20. Discord: https://discord.gg/sG9cyfGPj5
  21. Greasyfork: https://gf.qytechs.cn/en/users/919633
  22. MooMooForge: https://github.com/MooMooForge
  23. */
  24.  
  25. (function() {
  26. "use strict";
  27.  
  28. const log = console.log;
  29. function isInput() {
  30. const element = document.activeElement;
  31. return ["TEXTAREA", "INPUT"].includes(element.tagName);
  32. }
  33.  
  34. window.addEventListener("keydown", function(event) {
  35. if (event.code === "Space" && !isInput()) {
  36. event.preventDefault();
  37. }
  38. })
  39.  
  40. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址