From 449ce77c01b07f915e3cfc0a2af785f209168d94 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Sun, 9 Jul 2023 23:04:32 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20(scroll)=20add=20param=20scroll=20t?= =?UTF-8?q?o=20be=20able=20to=20scroll=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.ts b/main.ts index 1c3d738..19b832b 100644 --- a/main.ts +++ b/main.ts @@ -41,3 +41,9 @@ if (textHide === "hide") { const focusables = document.querySelectorAll(".focusable") focusables.forEach((focusable) => focusable.classList.add("text-hide")) } + +const scrollParam = params.get("scroll") + +if (scrollParam === "end") { + window.scrollTo({ top: document.body.scrollHeight, behavior: "smooth" }) +}