AllenAI, Grok no auto scro

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

נכון ליום 16-05-2025. ראה הגרסה האחרונה.

// ==UserScript==
// @name         AllenAI, Grok no auto scro
// @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.20250516153201
// @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 () {};
})();