DontTouchMyScroll

port from DontTouchMyScroll-Chrome

  1. // ==UserScript==
  2. // @name DontTouchMyScroll
  3. // @namespace NoNameSpace
  4. // @version 0.1
  5. // @description port from DontTouchMyScroll-Chrome
  6. // @author You
  7. // @include *
  8. // @match https://github.com/levibostian/DontTouchMyScroll-Chrome/blob/master/app/disable_scroll.js
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. 'use strict';
  13.  
  14. /*
  15. Found script: https://gist.github.com/oxguy3/ebd9fe692518c7f7a1e9#file-roughscroll-js
  16. */
  17.  
  18. document.getElementsByTagName("body")[0].addEventListener("wheel",function (event) {
  19. // exception for ACE Editor, JS text editor used by sites like GitHub
  20. if (event.target.classList.contains('ace_content')) {
  21. return;
  22. }
  23.  
  24. event.stopPropagation();
  25. }, true);

QingJ © 2025

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