From 990a260ebef3810b58fc7e27d9d454a0d0317720 Mon Sep 17 00:00:00 2001 From: skuqre <74248935+skuqre@users.noreply.github.com> Date: Mon, 19 Aug 2024 16:29:57 +0800 Subject: [PATCH] =?UTF-8?q?i=20HATE=20trailing=20slashes=20=F0=9F=98=A1?= =?UTF-8?q?=F0=9F=98=A1=F0=9F=98=A1=F0=9F=98=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scripts/tutorial.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/scripts/tutorial.js b/src/scripts/tutorial.js index 2a88b6e..614bd82 100644 --- a/src/scripts/tutorial.js +++ b/src/scripts/tutorial.js @@ -1727,12 +1727,14 @@ if (document.getElementById("tutorial") !== null) { } } -if (location.href.includes("nikke-font-generator/dialogue#start-tutorial") || - location.href.includes("nikke-font-generator/dialogue/#start-tutorial")) { - startDialogueTutorial(); -} else if (location.href.includes("nikke-font-generator/blabla#start-tutorial") || - location.href.includes("nikke-font-generator/blabla/#start-tutorial")) { - startBlablaTutorial(); +var hash = window.location.hash; + +if (hash === "#start-tutorial") { + if (location.href.includes("/nikke-font-generator/dialogue")) { + startDialogueTutorial(); + } else if (location.href.includes("/nikke-font-generator/blabla")) { + startBlablaTutorial(); + } } if (document.getElementById("error404")) {