From 14d8180519290989b11de4eda2ce4fde5cf1c1fb Mon Sep 17 00:00:00 2001 From: "Unisko PENG," Date: Wed, 19 Apr 2023 11:06:58 +0800 Subject: [PATCH] Updated. --- theme/pagetoc.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/theme/pagetoc.js b/theme/pagetoc.js index 43dce07..2e79f03 100644 --- a/theme/pagetoc.js +++ b/theme/pagetoc.js @@ -54,6 +54,8 @@ if(document.querySelector("#document-not-found404")) { var timerId = setInterval(() => { if(timeLeft == -1) { clearTimeout(timerId); + let siteRoot = window.location.origin; + window.location.replace(siteRoot); } else { let secCounts = document.querySelectorAll(".sec-count") secCounts.forEach(count => { @@ -62,5 +64,4 @@ if(document.querySelector("#document-not-found404")) { timeLeft--; } }, 1000); - console.log("Page not found"); }