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 = {
|
var realtimeReplacers = {
|
||||||
|
"API_CONNECTED": api.connected.toString(),
|
||||||
"ACTIVITIES": activityToHTML.activitiesToHTML(api.lanyard),
|
"ACTIVITIES": activityToHTML.activitiesToHTML(api.lanyard),
|
||||||
"SPINCOUNT": globalSpins,
|
"SPINCOUNT": globalSpins,
|
||||||
"UPTIME": timeFormatter((Date.now() - uptime) / 1000),
|
"UPTIME": timeFormatter((Date.now() - uptime) / 1000),
|
||||||
|
|
|
@ -110,6 +110,8 @@ window.onbeforeunload = function () {
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
|
|
||||||
|
$("#jsEnabled").text("true")
|
||||||
|
|
||||||
pfp = $(".pfp")
|
pfp = $(".pfp")
|
||||||
|
|
||||||
spinLoop()
|
spinLoop()
|
||||||
|
@ -173,6 +175,7 @@ function socketeer() {
|
||||||
|
|
||||||
sock.addEventListener("close", () => {
|
sock.addEventListener("close", () => {
|
||||||
console.log("Connection Closed. Attempting Reconnect in 30 seconds.")
|
console.log("Connection Closed. Attempting Reconnect in 30 seconds.")
|
||||||
|
$("#apiConnected").text("false")
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
socketeer()
|
socketeer()
|
||||||
}, 30000);
|
}, 30000);
|
||||||
|
@ -182,6 +185,7 @@ function socketeer() {
|
||||||
data = data.data
|
data = data.data
|
||||||
data = JSON.parse(data)
|
data = JSON.parse(data)
|
||||||
if (data.op == 4) {
|
if (data.op == 4) {
|
||||||
|
$("#apiConnected").text("true")
|
||||||
globalSpins = data.spins
|
globalSpins = data.spins
|
||||||
if (firsttimeDebounce == true) {
|
if (firsttimeDebounce == true) {
|
||||||
firsttimeDebounce = false
|
firsttimeDebounce = false
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<meta content="https://api.violets-purgatory.dev/v1/pfp" property="og:image" />
|
<meta content="https://api.violets-purgatory.dev/v1/pfp" property="og:image" />
|
||||||
<meta content="#a200ff" data-react-helmet="true" name="theme-color" />
|
<meta content="#a200ff" data-react-helmet="true" name="theme-color" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
{WEATHER_MODIFIER}
|
{WEATHER_MODIFIER}
|
||||||
<a href="../" class="chip">Home</a>
|
<a href="../" class="chip">Home</a>
|
||||||
|
@ -42,6 +42,9 @@
|
||||||
<li>Uptime: {UPTIME}</li>
|
<li>Uptime: {UPTIME}</li>
|
||||||
<li>Last Lanyard update: {LAST_LANYARD}</li>
|
<li>Last Lanyard update: {LAST_LANYARD}</li>
|
||||||
<li>Last Pregeneration: {LAST_PREGEN}</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>
|
</ul>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue