Spin Counter fixes
This commit is contained in:
parent
50ea2225a6
commit
dcf99afbe6
2 changed files with 3 additions and 4 deletions
|
@ -15,8 +15,6 @@ var highlightedWords = constants.highlightedWords
|
||||||
var quotes = constants.quotes
|
var quotes = constants.quotes
|
||||||
var titles = constants.titles
|
var titles = constants.titles
|
||||||
|
|
||||||
var globalSpins = 0
|
|
||||||
|
|
||||||
var commitCount = "600+"
|
var commitCount = "600+"
|
||||||
|
|
||||||
var uptime = Date.now()
|
var uptime = Date.now()
|
||||||
|
@ -267,7 +265,7 @@ function converter(html, dynamic = true) {
|
||||||
var realtimeReplacers = {
|
var realtimeReplacers = {
|
||||||
"API_CONNECTED": api.connected.toString(),
|
"API_CONNECTED": api.connected.toString(),
|
||||||
"ACTIVITIES": activityToHTML.activitiesToHTML(api.lanyard),
|
"ACTIVITIES": activityToHTML.activitiesToHTML(api.lanyard),
|
||||||
"SPINCOUNT": globalSpins,
|
"SPINCOUNT": api.spins.toString(),
|
||||||
"UPTIME": timeFormatter((Date.now() - uptime) / 1000),
|
"UPTIME": timeFormatter((Date.now() - uptime) / 1000),
|
||||||
"LAST_LANYARD": timeFormatter((Date.now() - api.lastLanyardUpdate) / 1000),
|
"LAST_LANYARD": timeFormatter((Date.now() - api.lastLanyardUpdate) / 1000),
|
||||||
"RANDOM_TITLE": titles[Math.floor(Math.random() * titles.length)],
|
"RANDOM_TITLE": titles[Math.floor(Math.random() * titles.length)],
|
||||||
|
|
|
@ -78,7 +78,8 @@ function spinLoop() {
|
||||||
}
|
}
|
||||||
spins += 1/spinSpeed / spinFactor
|
spins += 1/spinSpeed / spinFactor
|
||||||
if (Math.floor(spins) != lastSent && sock && sock.OPEN) {
|
if (Math.floor(spins) != lastSent && sock && sock.OPEN) {
|
||||||
$(".globalSpins").innerHTML = globalSpins + 1
|
console.log("RAH")
|
||||||
|
$(".globalSpins").text(globalSpins + 1)
|
||||||
lastSent = Math.floor(spins)
|
lastSent = Math.floor(spins)
|
||||||
// resetPFP()
|
// resetPFP()
|
||||||
sock.send(`{"op": 4}`)
|
sock.send(`{"op": 4}`)
|
||||||
|
|
Loading…
Reference in a new issue