`
debounce = true
}
function get_img() {
@@ -341,6 +344,10 @@ function pageUpdate() {
html = html.replace("{OPPOSITE_BRANCH}", "Beta")
}
+ html = html.replace("{UPTIME}", gameTimeFormatter((Date.now() - uptime) / 1000) + ' ago')
+ html = html.replace("{LAST_LANYARD}", gameTimeFormatter((Date.now() - lastLanyardUpdate) / 1000) + ' ago')
+ html = html.replace("{QUOTE_COUNT}", randomQuotes.length)
+
//fs.writeFileSync(path.join(__dirname, 'static/index.html'), html)
return html
}
@@ -370,6 +377,7 @@ lanyard.addEventListener("message", (res) => {
}))
} else if (data.op == 0) {
lanyardData = data.d
+ lastLanyardUpdate = Date.now()
}
})
diff --git a/resources/mainPage.html b/resources/mainPage.html
index 3abe897..782f12c 100644
--- a/resources/mainPage.html
+++ b/resources/mainPage.html
@@ -59,8 +59,16 @@
server-side, so enjoy :D
Check out the source code on Codeberg
-
{LANYARD_FULL}
+
+
Stats:
+
Just some funny stats for the site :3
+
+ - Uptime: {UPTIME}
+ - Last Lanyard Update: {LAST_LANYARD}
+ - Quotes: {QUOTE_COUNT}
+
+
{SOCIALS}
{SEASONAL_EFFECT}