diff --git a/frontend/static/js/index.js b/frontend/static/js/index.js index 7fb4c8a..68521d9 100644 --- a/frontend/static/js/index.js +++ b/frontend/static/js/index.js @@ -138,9 +138,8 @@ window.addEventListener("popstate", function() {router(location.pathname);}); document.addEventListener("DOMContentLoaded", async () => { document.body.addEventListener("click", e => { - if (e.target.matches("[data-link]")) { - e.preventDefault(); - document.querySelector('[data-link].nav-link.active')?.classList.remove('active'); + if (e.target.classList.contains('nav-link')) { + document.querySelector('[data-link].active')?.classList.remove('active'); if (e.target.classList.contains('nav-link')) e.target.classList.add('active'); navigateTo(e.target.href.slice(location.origin.length)); diff --git a/frontend/templates/index.html b/frontend/templates/index.html index f44f7c0..29be311 100644 --- a/frontend/templates/index.html +++ b/frontend/templates/index.html @@ -7,7 +7,6 @@ Bozo Pong -