forked from rDrama/rDrama
1
0
Fork 0

avoid a potential bug with global variable

master
Aevann 2024-03-05 23:29:04 +02:00
parent c880ca0e00
commit ee46d72aeb
1 changed files with 3 additions and 3 deletions

View File

@ -1,10 +1,10 @@
const dt = new Date();
let secs = dt.getSeconds() + (60 * dt.getMinutes()) + (60 * 60 * dt.getHours());
let death_secs = dt.getSeconds() + (60 * dt.getMinutes()) + (60 * 60 * dt.getHours());
function update_death_counter() {
secs += 1
death_secs += 1
for (const el of document.getElementsByClassName('deaths-today'))
el.innerHTML = secs.toLocaleString()
el.innerHTML = death_secs.toLocaleString()
}
update_death_counter()