From 2477a7ee20cca4a4b368e434bb242e7e05d075c7 Mon Sep 17 00:00:00 2001 From: Captain ALM Date: Sat, 30 Jul 2022 17:03:52 +0100 Subject: [PATCH] Fully fix URL splitting code. --- index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index 4fa5638..5076a51 100644 --- a/index.js +++ b/index.js @@ -77,8 +77,7 @@ function ToggleTheme() { let thsty = document.getElementById("style-theme") let logo = document.getElementById("logo") let url = document.location.href - url = url.split("#", 1) - url = url.split('?', 1) + url = url.split("#", 1)[0].split('?', 1)[0] if (document.getElementById("so-theme")) { thimg.src = SunImageURL thimg.alt = "()"