forked from rDrama/rDrama
dsfdfs
parent
409f77d021
commit
d5f2905c78
|
@ -35,6 +35,23 @@
|
||||||
|
|
||||||
|
|
||||||
{% if 'rdrama' not in request.host %}
|
{% 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 %}
|
{% if v %}
|
||||||
<script src="/assets/js/comments_v.js?v=14"></script>
|
<script src="/assets/js/comments_v.js?v=14"></script>
|
||||||
{% include "award_modal.html" %}
|
{% include "award_modal.html" %}
|
||||||
|
|
Loading…
Reference in New Issue