diff --git a/pageUpdater.js b/pageUpdater.js index bcddba1..eed88eb 100644 --- a/pageUpdater.js +++ b/pageUpdater.js @@ -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), diff --git a/static/main.js b/static/main.js index cfe3ce3..37e8997 100644 --- a/static/main.js +++ b/static/main.js @@ -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 diff --git a/static/stats/index.html b/static/stats/index.html index a6748b4..a83c54e 100644 --- a/static/stats/index.html +++ b/static/stats/index.html @@ -20,7 +20,7 @@ - + {WEATHER_MODIFIER} Home @@ -42,6 +42,9 @@
  • Uptime: {UPTIME}
  • Last Lanyard update: {LAST_LANYARD}
  • Last Pregeneration: {LAST_PREGEN}
  • +
  • Server connected to API: {API_CONNECTED}
  • +
  • Javascript Loaded/Enabled: false
  • +
  • Client connected to API: false