This commit is contained in:
Aevann1 2021-12-04 03:49:34 +02:00
parent 272101af14
commit b3f22451fc
4 changed files with 27 additions and 24 deletions

View file

@ -15,6 +15,13 @@ 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'); var clipboard = new ClipboardJS('.copy-link');
clipboard.on('success', function(e) { clipboard.on('success', function(e) {
var myToast = new bootstrap.Toast(document.getElementById('toast-success')); var myToast = new bootstrap.Toast(document.getElementById('toast-success'));
@ -31,9 +38,4 @@ const popoverList = popoverTriggerList.map(function(popoverTriggerEl) {
html: true, html: true,
}); });
}) })
});
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!";
}

View file

@ -761,7 +761,7 @@
{% include "expanded_image_modal.html" %} {% include "expanded_image_modal.html" %}
<script defer src="/assets/js/popover.js?v=9"></script> <script defer src="/assets/js/popover.js?v=9"></script>
<script defer src="/assets/js/comments.js?v=3"></script> <script defer src="/assets/js/comments.js?v=4"></script>
<script> <script>
window.addEventListener("load",function(event) { window.addEventListener("load",function(event) {

View file

@ -125,12 +125,13 @@
<script defer src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script> <script defer src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
<script> <script>
window.addEventListener("load",function(event) {
var clipboard = new ClipboardJS('.copy-link'); var clipboard = new ClipboardJS('.copy-link');
clipboard.on('success', function(e) { clipboard.on('success', function(e) {
var myToast = new bootstrap.Toast(document.getElementById('toast-success')); var myToast = new bootstrap.Toast(document.getElementById('toast-success'));
myToast.show(); myToast.show();
}); });
});
</script> </script>
{% endblock %} {% endblock %}

View file

@ -878,7 +878,7 @@
{% include "ban_modal.html" %} {% include "ban_modal.html" %}
{% endif %} {% endif %}
{% endif %} {% endif %}
<script defer src="/assets/js/comments.js?v=3"></script> <script defer src="/assets/js/comments.js?v=4"></script>
{% include "expanded_image_modal.html" %} {% include "expanded_image_modal.html" %}
{% endif %} {% endif %}