From 6c144a64aa158dd76976b504c5d81fc217361697 Mon Sep 17 00:00:00 2001 From: andatoshiki <101481353+andatoshiki@users.noreply.github.com> Date: Thu, 2 Mar 2023 12:36:00 +0800 Subject: [PATCH] refactor(variable): change footer sitetime variable to `siteruntime` --- docs/.vitepress/config/head.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.vitepress/config/head.ts b/docs/.vitepress/config/head.ts index efd24819..c2b15501 100644 --- a/docs/.vitepress/config/head.ts +++ b/docs/.vitepress/config/head.ts @@ -34,7 +34,7 @@ export const head: HeadConfig[] = [ [ 'script', {}, - `function show_runtime() {window.setTimeout("show_runtime()", 1000); X = new Date("8/24/2021 10:28:00"); Y = new Date(); T = (Y.getTime() - X.getTime()); M = 24 * 60 * 60 * 1000; a = T / M; A = Math.floor(a); b = (a - A) * 24; B = Math.floor(b); c = (b - B) * 60; C = Math.floor((b - B) * 60); D = Math.floor((c - C) * 60); runtime_span.innerHTML = "本小站已苟延残喘: " + A + "天" + B + "小时" + C + "分" + D + "秒" }show_runtime(); + `function siteruntime() {window.setTimeout("siteruntime()", 1000); X = new Date("8/24/2021 10:28:00"); Y = new Date(); T = (Y.getTime() - X.getTime()); M = 24 * 60 * 60 * 1000; a = T / M; A = Math.floor(a); b = (a - A) * 24; B = Math.floor(b); c = (b - B) * 60; C = Math.floor((b - B) * 60); D = Math.floor((c - C) * 60); siteruntime_span.innerHTML = "This site has been running for: " + A + " " + "day(s)" + " " + B + "hour(s)" + C + "minute(s)" + D + "second(s)" }siteruntime(); `, ],