Just some changes to the stats section

This commit is contained in:
Violet 2024-02-02 15:06:39 +00:00 committed by GitHub
parent 0a5fbced04
commit 22ffbd7677
2 changed files with 6 additions and 6 deletions

View file

@ -86,7 +86,7 @@ function gameTimeFormatter(seconds) {
var minutes = Math.ceil(seconds / 60)
var hours = Math.floor(minutes / 60)
if (seconds <= 60) {
return 'Under a minute'
return 'about ' + seconds + ' seconds'
} else if (minutes < 60) {
return `${minutes} Minutes`
}
@ -367,7 +367,7 @@ async function pageUpdate() {
html = html.replace("{OPPOSITE_BRANCH}", "Beta")
}
html = html.replace("{UPTIME}", gameTimeFormatter((Date.now() - uptime) / 1000) + ' ago')
html = html.replace("{UPTIME}", gameTimeFormatter((Date.now() - uptime) / 1000))
html = html.replace("{LAST_LANYARD}", gameTimeFormatter((Date.now() - lastLanyardUpdate) / 1000) + ' ago')
html = html.replace("{QUOTE_COUNT}", randomQuotes.length)
html = html.replace("{CACHED_IMAGES}", fs.readdirSync(path.join(staticpath, 'cached')).length)

View file

@ -58,8 +58,10 @@
</noscript>
<p>Check out the source code on <a href="https://codeberg.org/Bingus_Violet/Violets-Purgatory">Codeberg</a></p>
{LANYARD_FULL}
<h2><hr>Stats:</h2>
{SOCIALS}
<h2><hr>Silly Stats:</h2>
<p>Just some funny stats for the site :3</p>
<ul>
<li>Uptime: {UPTIME}</li>
@ -69,8 +71,6 @@
<li>Page Generation Time: {GENERATION_TIME}</li>
</ul>
{SOCIALS}
{SEASONAL_EFFECT}
</div>
</body>