Disable Smooth Scrolling

Disable smooth scrolling on all websites

当前为 2024-05-11 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Disable Smooth Scrolling
  3. // @namespace https://greasyfork.org/users/1300060
  4. // @version 0.1
  5. // @description Disable smooth scrolling on all websites
  6. // @author AstralRift
  7. // @match *://*/*
  8. // @run-at document-end
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. function stopSmoothScrolling(event) {
  17. if (event.target.classList.contains('ace_content')) {
  18. return;
  19. }
  20. event.stopPropagation();
  21. }
  22.  
  23. document.addEventListener("wheel", stopSmoothScrolling, true);
  24. })();