refactor(variable): change footer sitetime variable to siteruntime

This commit is contained in:
andatoshiki 2023-03-02 12:36:00 +08:00
parent 99f35003ae
commit 6c144a64aa

View File

@ -34,7 +34,7 @@ export const head: HeadConfig[] = [
[ [
'script', '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();
`, `,
], ],