From 361eae73f082e70073e24fbf9f76bafdf355f8e2 Mon Sep 17 00:00:00 2001 From: Namonay Date: Mon, 1 Apr 2024 02:04:57 +0200 Subject: [PATCH] fix: my skill issue and git --- frontend/static/js/index.js | 5 ++--- frontend/templates/index.html | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) 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 -