diff --git a/web/assets/js/main.js b/web/assets/js/main.js index 91b47f9..846ae5b 100644 --- a/web/assets/js/main.js +++ b/web/assets/js/main.js @@ -110,6 +110,16 @@ b_next.addEventListener("click", e => { e.preventDefault(); }); + +for (let i = 0; i < file_links.length; ++i) + file_links[i].addEventListener("click", e => { + g_current_row = e.target.parentNode.parentNode; + if (send_to_overlay(e.target.pathname, determine_media_element(e.target.pathname))) + e.preventDefault(); + }); + +//// KEYBOARD HANDLING + window.addEventListener("keydown", e => { if (e.isComposing) return; @@ -145,14 +155,6 @@ window.addEventListener("keydown", e => { } }); - -for (let i = 0; i < file_links.length; ++i) - file_links[i].addEventListener("click", e => { - g_current_row = e.target.parentNode.parentNode; - if (send_to_overlay(e.target.pathname, determine_media_element(e.target.pathname))) - e.preventDefault(); - }); - //// FILTERING