Disable Auto-Scroll Functions on AllenAI Playground

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

Verze ze dne 16. 05. 2025. Zobrazit nejnovější verzi.

// ==UserScript==
// @name         Disable Auto-Scroll Functions on AllenAI Playground
// @description  Disable JavaScript-triggered scrolling like scrollIntoView on playground.allenai.org
// @match        https://playground.allenai.org/*
// @match        https://grok.com/*
// @run-at       document-start
// @version 0.0.1.20250516151238
// @namespace https://greasyfork.org/users/1435046
// ==/UserScript==

(function() {
  'use strict';

  // Override scroll-related functions to no-ops
  Element.prototype.scrollIntoView = function () {};
  Element.prototype.scrollIntoViewIfNeeded = function () {};
  Element.prototype.scrollTo = function () {};
  window.scrollTo = function () {};
  window.scrollBy = function () {};
})();