no auto scroll

Disable JavaScript-triggered scrolling like scrollIntoView

当前为 2025-05-22 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name no auto scroll
  3. // @description Disable JavaScript-triggered scrolling like scrollIntoView
  4. // @match https://playground.allenai.org/*
  5. // @match https://grok.com/*
  6. // @match https://9to5mac.com/*
  7. // @match https://chat.mistral.ai/*
  8. // @match https://chat.falconllm.tii.ae/*
  9. // @run-at document-start
  10. // @version 0.0.1.20250522083416
  11. // @namespace https://greasyfork.org/users/1435046
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16.  
  17. // Override scroll-related functions to no-ops
  18. Element.prototype.scrollIntoView = function () {};
  19. Element.prototype.scrollIntoViewIfNeeded = function () {};
  20. Element.prototype.scrollTo = function () {};
  21. window.scrollTo = function () {};
  22. window.scrollBy = function () {};
  23. })();