From 7af98fdc52b8aee4ef3a1e0179c1df33e99f61e5 Mon Sep 17 00:00:00 2001 From: sk5s Date: Sat, 13 Nov 2021 09:21:48 +0800 Subject: [PATCH] change location.href to location.replace --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 29f261d..141d983 100644 --- a/index.html +++ b/index.html @@ -19,10 +19,10 @@

This site need javascript to redirect. If javascript is disabled then you ne let book = { 'test' : 'https://lab.sk5s.cyou/' } - if (redirect !== null && book[redirect] !== '' && book[redirect] !== null) { - location.href = book[redirect]; + if (redirect !== null && book[redirect] !== '' && book[redirect] !== undefined) { + window.location.replace(book[redirect]) } else { - location.href = defaultLink; + window.location.replace(defaultLink) }