fix
This commit is contained in:
parent
06770d5e85
commit
faa7603c20
2 changed files with 15 additions and 1 deletions
|
@ -9,3 +9,17 @@ function togglePostEdit(id){
|
|||
form.classList.toggle("hidden");
|
||||
autoExpand(box);
|
||||
};
|
||||
|
||||
function bet_vote(cid) {
|
||||
for(let el of document.getElementsByClassName('bet')) {
|
||||
el.disabled = true;
|
||||
}
|
||||
for(let el of document.getElementsByClassName('cost')) {
|
||||
el.classList.add('hidden')
|
||||
}
|
||||
var scoretext = document.getElementById('bet-' + cid);
|
||||
var score = Number(scoretext.textContent);
|
||||
scoretext.textContent = score + 1;
|
||||
post('/bet/' + cid);
|
||||
document.getElementById("user-coins-amount").innerText = parseInt(document.getElementById("user-coins-amount").innerText) - 200;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue