forked from rDrama/rDrama
1
0
Fork 0

update "X owned" next to "give award" in realtime

master
Aevann 2023-10-10 20:39:05 +03:00
parent c3f01801e2
commit ba1f14bdf5
1 changed files with 6 additions and 1 deletions

View File

@ -178,7 +178,12 @@ function giveaward(t) {
let owned = document.getElementById(`${kind}-owned`)
let ownednum = Number(owned.textContent);
if (ownednum) {
owned.textContent = ownednum - 1
ownednum -= 1
owned.textContent = ownednum
if (ownednum)
document.getElementById('award_price').textContent = `${ownednum} owned`;
else
document.getElementById('award_price').textContent = `Price: ${global_price} coins/marseybux`;
}
}
);