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://electrek.co/*
  8. // @match https://chat.mistral.ai/*
  9. // @match https://chat.falconllm.tii.ae/*
  10. // @run-at document-start
  11. // @version 0.0.1.20250522185453
  12. // @namespace https://greasyfork.org/users/1435046
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17.  
  18. // Override scroll-related functions to no-ops
  19. Element.prototype.scrollIntoView = function () {};
  20. Element.prototype.scrollIntoViewIfNeeded = function () {};
  21. Element.prototype.scrollTo = function () {};
  22. window.scrollTo = function () {};
  23. window.scrollBy = function () {};
  24. })();