Stats
This commit is contained in:
parent
9c8af629fe
commit
9efde97690
2 changed files with 18 additions and 2 deletions
10
index.js
10
index.js
|
@ -21,6 +21,9 @@ var activityImages = config.activityImages
|
|||
|
||||
var highlight = config.highlightedWords
|
||||
|
||||
var uptime = Date.now()
|
||||
var lastLanyardUpdate = Date.now()
|
||||
|
||||
var thumbCount = 0
|
||||
|
||||
function getThumbor() {
|
||||
|
@ -151,7 +154,7 @@ function pageUpdate() {
|
|||
}
|
||||
|
||||
if (!debounce && activity.type != 4) {
|
||||
addedHTML += `<h2><hr>What I'm up to:</h2><div class="container-fluid row" style="margin: 0; padding: 0; display: flex;">`
|
||||
addedHTML += `<h1><hr>What I'm up to:</h1><div class="container-fluid row" style="margin: 0; padding: 0; display: flex;">`
|
||||
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()
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -59,8 +59,16 @@
|
|||
server-side, so enjoy :D</p>
|
||||
</noscript>
|
||||
<p>Check out the source code on <a href="https://codeberg.org/Bingus_Violet/Violets-Purgatory">Codeberg</a></p>
|
||||
|
||||
{LANYARD_FULL}
|
||||
|
||||
<h1><hr>Stats:</h1>
|
||||
<p>Just some funny stats for the site :3</p>
|
||||
<ul>
|
||||
<li>Uptime: {UPTIME}</li>
|
||||
<li>Last Lanyard Update: {LAST_LANYARD}</li>
|
||||
<li>Quotes: {QUOTE_COUNT}</li>
|
||||
</ul>
|
||||
|
||||
{SOCIALS}
|
||||
|
||||
{SEASONAL_EFFECT}
|
||||
|
|
Loading…
Reference in a new issue