Disable Auto-Scroll Functions on AllenAI Playground

Disable JavaScript-triggered scrolling like scrollIntoView on playground.allenai.org

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

  1. // ==UserScript==
  2. // @name Disable Auto-Scroll Functions on AllenAI Playground
  3. // @description Disable JavaScript-triggered scrolling like scrollIntoView on playground.allenai.org
  4. // @match https://playground.allenai.org/*
  5. // @run-at document-start
  6. // @version 0.0.1.20250516143436
  7. // @namespace https://greasyfork.org/users/1435046
  8. // ==/UserScript==
  9.  
  10. (function() {
  11. 'use strict';
  12.  
  13. // Override scroll-related functions to no-ops
  14. Element.prototype.scrollIntoView = function () {};
  15. /*Element.prototype.scrollIntoViewIfNeeded = function () {};
  16. Element.prototype.scrollTo = function () {};
  17. window.scrollTo = function () {};
  18. window.scrollBy = function () {};*/
  19. })();