forked from MarseyWorld/MarseyWorld
update "X owned" next to "give award" in realtime
parent
c3f01801e2
commit
ba1f14bdf5
|
@ -178,7 +178,12 @@ function giveaward(t) {
|
||||||
let owned = document.getElementById(`${kind}-owned`)
|
let owned = document.getElementById(`${kind}-owned`)
|
||||||
let ownednum = Number(owned.textContent);
|
let ownednum = Number(owned.textContent);
|
||||||
if (ownednum) {
|
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`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue