forked from rDrama/rDrama
avoid a potential bug with global variable
parent
c880ca0e00
commit
ee46d72aeb
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue