From b6dc1bae7850970be88a075e96865b0db3f10bcd Mon Sep 17 00:00:00 2001 From: lilxyzw Date: Mon, 14 Oct 2024 16:32:50 +0900 Subject: [PATCH] fix: redirect to top --- docs/public/scripts/redirect.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/public/scripts/redirect.js b/docs/public/scripts/redirect.js index 4629bb1c..af6f618e 100644 --- a/docs/public/scripts/redirect.js +++ b/docs/public/scripts/redirect.js @@ -6,6 +6,10 @@ if(hash.length != 0) { hash = hash.substring(7); } + if(hash.startsWith('/')) + { + hash = hash.substring(1); + } const lang = window.navigator.language || window.navigator.userLanguage || window.navigator.browserLanguage; if(lang.startsWith('ja')) location.href = `${url}ja_JP/${hash}`; else location.href = `${url}ja_JP/${hash}`;