diff --git a/static/js/main.js b/static/js/main.js index c663643..77b0a69 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -11,26 +11,6 @@ function closeAlert() { document.getElementById("be-alert-container").style.display = "none"; } - window.addEventListener("load", () => { - // (A) GET HTML ELEMENTS - var filter = document.getElementById("fe-search-filter"), // search box - list = document.querySelectorAll("#fe-search-filter-list li"); // all list items - - // (B) ATTACH KEY UP LISTENER TO SEARCH BOX - filter.onkeyup = () => { - // (B1) GET CURRENT SEARCH TERM - let search = filter.value.toLowerCase(); - - // (B2) LOOP THROUGH LIST ITEMS - ONLY SHOW THOSE THAT MATCH SEARCH - for (let i of list) { - let item = i.innerHTML.toLowerCase(); - if (item.indexOf(search) == -1) { i.classList.add("hide"); } - else { i.classList.remove("hide"); } - } - }; - }); - - function copyToClipBoard (slug) { let URL = location.protocol + "//" + location.host + "/storage/view/media/" + slug; let popup = document.getElementById(slug + "-popup");