forked from MarseyWorld/MarseyWorld
fdsfds
parent
e8c0ce18a2
commit
8d1de6e628
|
@ -24,6 +24,8 @@ else: cc = "country club"
|
|||
@app.get("/distribute/<cid>")
|
||||
@admin_level_required(2)
|
||||
def distribute(v, cid):
|
||||
try: int(cid)
|
||||
except: abort(400)
|
||||
votes = g.db.query(CommentVote).filter_by(comment_id=cid)
|
||||
autobetter = g.db.query(User).filter_by(id=AUTOBETTER_ID).first()
|
||||
coinsperperson = int(autobetter.coins / votes.count())
|
||||
|
|
|
@ -13,20 +13,6 @@
|
|||
|
||||
{% block title %}
|
||||
|
||||
<script>
|
||||
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')
|
||||
}
|
||||
</script>
|
||||
|
||||
{% if p.award_count("train") %}
|
||||
<style>
|
||||
@keyframes train {
|
||||
|
@ -806,7 +792,11 @@
|
|||
{% endif %}
|
||||
|
||||
{% if v and (v.id == p.author_id or v.admin_level > 1 and v.admin_level > 2) %}
|
||||
<script src="/assets/js/submission.js?v=3"></script>
|
||||
<script src="/assets/js/togglePostEdit.js?v=3"></script>
|
||||
{% endif %}
|
||||
|
||||
{% if v %}
|
||||
<script src="/assets/js/submission.js?v=5"></script>
|
||||
{% endif %}
|
||||
|
||||
{% if not v or v.highlightcomments %}
|
||||
|
|
Loading…
Reference in New Issue