From ad3b2e1ae7f3020cef4103800819799ab2366d94 Mon Sep 17 00:00:00 2001 From: beefchimi Date: Mon, 29 Jul 2024 12:47:46 -0400 Subject: [PATCH] :adhesive_bandage: [PageLoad] Remove hash from url --- src/scripts/PageLoad.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/scripts/PageLoad.ts b/src/scripts/PageLoad.ts index 86cc8fa..85742dc 100644 --- a/src/scripts/PageLoad.ts +++ b/src/scripts/PageLoad.ts @@ -26,7 +26,11 @@ export class PageLoad { } static #handleReadyState() { + // Before running the timer to "update document", we want to make sure any + // hash URL is removed and we reset our scroll position. + history.replaceState(null, '', ' '); window.scrollTo(0, 0); + window.setTimeout(PageLoad.#updateDocument, PageLoad.MOTION_DELAY); }