no auto scroll

Disable JavaScript-triggered scrolling like scrollIntoView

  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.20250620184805
  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.  
  25. // Block scrollTop assignments (what falcon.tii uses)
  26. Object.defineProperty(HTMLElement.prototype, 'scrollTop', {
  27. set() { },
  28. get() { return 0; },
  29. configurable: false
  30. });
  31. })();