fdsfds
This commit is contained in:
parent
8c13a0c879
commit
2a965e9ff5
4 changed files with 29 additions and 26 deletions
|
@ -1,11 +1,11 @@
|
|||
function togglePostEdit(id){
|
||||
body=document.getElementById("post-body");
|
||||
title=document.getElementById("post-title");
|
||||
form=document.getElementById("edit-post-body-"+id);
|
||||
box=document.getElementById("post-edit-box-"+id);
|
||||
|
||||
body.classList.toggle("d-none");
|
||||
title.classList.toggle("d-none");
|
||||
form.classList.toggle("d-none");
|
||||
autoExpand(box);
|
||||
};
|
||||
function bet_vote(cid) {
|
||||
for(let el of document.getElementsByClassName('bet')) {
|
||||
el.disabled = true;
|
||||
}
|
||||
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;
|
||||
document.getElementById(`span-${cid}`).classList.add('bet_voted')
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue