diff --git a/files/assets/js/popover.js b/files/assets/js/popover.js index 3816ed4c9..c66d05e30 100644 --- a/files/assets/js/popover.js +++ b/files/assets/js/popover.js @@ -1,34 +1,36 @@ -function eventasdf(value){ - var content_id = value.getAttributeNode("data-content-id").value; - value.addEventListener("click", function(){jhkj(content_id)}); - } - - function checkIfBussy(){ - if (document.getElementById("bussy") != null){ - document.body.removeChild(document.getElementById("bussy")); +window.addEventListener('DOMContentLoaded', function() { + function eventasdf(value){ + var content_id = value.getAttributeNode("data-content-id").value; + value.addEventListener("click", function(){jhkj(content_id)}); } - } - - function dfgh(e){ - active = document.activeElement; - if (active.getAttributeNode("class") == null || active.getAttributeNode("class").nodeValue != "user-name text-decoration-none"){ + + function checkIfBussy(){ + if (document.getElementById("bussy") != null){ + document.body.removeChild(document.getElementById("bussy")); + } + } + + function dfgh(e){ + active = document.activeElement; + if (active.getAttributeNode("class") == null || active.getAttributeNode("class").nodeValue != "user-name text-decoration-none"){ + checkIfBussy(); + } + } + + function jhkj(value){ checkIfBussy(); + var popover_shit = document.getElementsByClassName("popover")[0]; + var uiop = document.createElement("DIV"); + + uiop.innerHTML = popover_shit.outerHTML; + uiop.id = "bussy"; + + document.body.appendChild(uiop); + document.body.removeChild(popover_shit); } - } - - function jhkj(value){ - checkIfBussy(); - var popover_shit = document.getElementsByClassName("popover")[0]; - var uiop = document.createElement("DIV"); - - uiop.innerHTML = popover_shit.outerHTML; - uiop.id = "bussy"; - - document.body.appendChild(uiop); - document.body.removeChild(popover_shit); - } - - var usernames = document.querySelectorAll("a.user-name"); - usernames.forEach(eventasdf); - - document.addEventListener("click", function(e){dfgh(e)}); \ No newline at end of file + + var usernames = document.querySelectorAll("a.user-name"); + usernames.forEach(eventasdf); + + document.addEventListener("click", function(e){dfgh(e)}); +}); \ No newline at end of file diff --git a/files/templates/comments.html b/files/templates/comments.html index 44772aa1c..429e32fcb 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -790,7 +790,7 @@ window.addEventListener('DOMContentLoaded', function() { - + {% if v and v.admin_level > 1 %} diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index 7c447bd02..9147f5289 100644 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -659,7 +659,7 @@ window.addEventListener('DOMContentLoaded', function() { - +