diff --git a/files/assets/js/comments.js b/files/assets/js/comments.js index 9e44c35a6..a22f578be 100644 --- a/files/assets/js/comments.js +++ b/files/assets/js/comments.js @@ -15,12 +15,6 @@ function collapse_comment(comment_id) { } }; -function poll_vote(cid, parentid) { - 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!"; -} - window.addEventListener("load",function(event) { var clipboard = new ClipboardJS('.copy-link'); clipboard.on('success', function(e) { diff --git a/files/templates/comments.html b/files/templates/comments.html index 10314b878..58452952f 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -749,7 +749,7 @@ {% if v %} - + {% endif %} @@ -761,7 +761,7 @@ {% include "expanded_image_modal.html" %} - + \ No newline at end of file diff --git a/files/templates/submission.html b/files/templates/submission.html index 8c3417c0a..8d50d3bb4 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -870,7 +870,7 @@ {% if not p.comment_count %} {% if v %} - + {% include "award_modal.html" %} {% include "emoji_modal.html" %} {% include "gif_modal.html" %} @@ -878,7 +878,7 @@ {% include "ban_modal.html" %} {% endif %} {% endif %} - + {% include "expanded_image_modal.html" %} {% endif %} @@ -896,7 +896,14 @@ mouseOver: "multiply" }); }); - + {% if not v %} + function poll_vote(cid, parentid) { + 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 %} + {% endif %}