From f4ee79c103a769df4c53f2eb0927d8313fce82c4 Mon Sep 17 00:00:00 2001 From: ByteDice Date: Fri, 17 Jan 2025 22:35:47 +0100 Subject: [PATCH] hopefully fixed bug when going back to site after pressing a redirect button --- global/globalScript.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/global/globalScript.js b/global/globalScript.js index 114ef32..e2a9479 100644 --- a/global/globalScript.js +++ b/global/globalScript.js @@ -180,6 +180,16 @@ window.addEventListener("resize", function() { } }) + +window.addEventListener("pageshow", (event) => { + if (event.persisted) { + // reload page to clear unwanted cache. + // for some reason the loading screen stays + // permanently open without this. + window.location.reload(); + } +}); + let prevAnimationState = isAnimating /*