From 4e6a165516a708f12d232fe4d096f1d0d284e0ae Mon Sep 17 00:00:00 2001 From: Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com> Date: Tue, 29 Oct 2024 18:15:45 -0400 Subject: [PATCH] Update reddit-stream-Enhancements.user.js --- reddit-stream-Enhancements.user.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reddit-stream-Enhancements.user.js b/reddit-stream-Enhancements.user.js index c3bdc31..c0c1fe0 100644 --- a/reddit-stream-Enhancements.user.js +++ b/reddit-stream-Enhancements.user.js @@ -91,7 +91,7 @@ handleHover(button); button.addEventListener('click', function () { - window.scrollTo({ + globalThis.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' }); @@ -125,7 +125,7 @@ const keepAtBottom = debounce(function () { if (stayAtBottomCheckbox.checked) { - window.scrollTo({ + globalThis.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' }); @@ -159,7 +159,7 @@ function startAutoReload10() { reloadInterval10 = setInterval(() => { - window.location.reload(); + globalThis.location.reload(); console.log("Page reloading every 10 seconds."); }, 10000); } @@ -193,7 +193,7 @@ function startAutoReload30() { reloadInterval30 = setInterval(() => { - window.location.reload(); + globalThis.location.reload(); console.log("Page reloading every 30 seconds."); }, 30000); }