remotes/1693045480750635534/spooky-22
Aevann1 2021-10-07 06:05:02 +02:00
parent 409f77d021
commit d5f2905c78
1 changed files with 17 additions and 0 deletions

View File

@ -35,6 +35,23 @@
{% if 'rdrama' not in request.host %}
<script>
function poll_vote(cid) {
{% if v %}
var type = document.getElementById(cid).checked;
var scoretext = document.getElementById('poll-' + cid);
var score = Number(scoretext.textContent);
if (type == true) scoretext.textContent = score + 1;
else scoretext.textContent = score - 1;
post('/vote/poll/' + cid + '?vote=' + type);
{% else %}
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
myToast.show();
document.getElementById('toast-post-error-text').innerText = "Only logged-in users can vote!";
{% endif %}
}
</script>
{% if v %}
<script src="/assets/js/comments_v.js?v=14"></script>
{% include "award_modal.html" %}