End only support

This commit is contained in:
bingus_violet 2024-06-29 18:36:27 -05:00
parent 53acf3a9e4
commit de40bbc179
2 changed files with 9 additions and 0 deletions

View file

@ -122,6 +122,10 @@ module.exports = {
<span class="timeEstimate" data-start="${activity.timestamps.start}">${gameTimeFormatter((Date.now() - activity.timestamps.start))}</span> <span class="timeEstimate" data-start="${activity.timestamps.start}">${gameTimeFormatter((Date.now() - activity.timestamps.start))}</span>
` `
} }
} else if (activity.timestamps.end) {
return `
<span class="endEstimate" data-end="${activity.timestamps.end}">${timeFormatter((activity.timestamps.end - Date.now()))}</span> left
`
} }
} }
} }

View file

@ -136,6 +136,11 @@ function loop() {
item.text(gameTimeFormatter(Date.now() - item.attr("data-start"))) item.text(gameTimeFormatter(Date.now() - item.attr("data-start")))
}) })
$(".endEstimate").each((_, item) => {
item = $(item)
item.text(timeFormatter((item.attr("data-end") - Date.now())))
})
loop() loop()
}, 1/spinSpeed * 1000); }, 1/spinSpeed * 1000);
} }