more stats
This commit is contained in:
parent
e8e78a07aa
commit
a72ce104f5
3 changed files with 9 additions and 1 deletions
|
@ -240,6 +240,7 @@ function converter(html, dynamic = true) {
|
|||
}
|
||||
|
||||
var realtimeReplacers = {
|
||||
"API_CONNECTED": api.connected.toString(),
|
||||
"ACTIVITIES": activityToHTML.activitiesToHTML(api.lanyard),
|
||||
"SPINCOUNT": globalSpins,
|
||||
"UPTIME": timeFormatter((Date.now() - uptime) / 1000),
|
||||
|
|
|
@ -110,6 +110,8 @@ window.onbeforeunload = function () {
|
|||
window.onload = function () {
|
||||
window.scrollTo(0, 0);
|
||||
|
||||
$("#jsEnabled").text("true")
|
||||
|
||||
pfp = $(".pfp")
|
||||
|
||||
spinLoop()
|
||||
|
@ -173,6 +175,7 @@ function socketeer() {
|
|||
|
||||
sock.addEventListener("close", () => {
|
||||
console.log("Connection Closed. Attempting Reconnect in 30 seconds.")
|
||||
$("#apiConnected").text("false")
|
||||
setTimeout(() => {
|
||||
socketeer()
|
||||
}, 30000);
|
||||
|
@ -182,6 +185,7 @@ function socketeer() {
|
|||
data = data.data
|
||||
data = JSON.parse(data)
|
||||
if (data.op == 4) {
|
||||
$("#apiConnected").text("true")
|
||||
globalSpins = data.spins
|
||||
if (firsttimeDebounce == true) {
|
||||
firsttimeDebounce = false
|
||||
|
|
|
@ -42,6 +42,9 @@
|
|||
<li>Uptime: {UPTIME}</li>
|
||||
<li>Last Lanyard update: {LAST_LANYARD}</li>
|
||||
<li>Last Pregeneration: {LAST_PREGEN}</li>
|
||||
<li>Server connected to API: {API_CONNECTED}</li>
|
||||
<li>Javascript Loaded/Enabled: <span id="jsEnabled">false</span></li>
|
||||
<li>Client connected to API: <span id="apiConnected">false</span></li>
|
||||
</ul>
|
||||
</main>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue