Revert "fix: my skill issue and git"

This reverts commit 361eae73f0.
This commit is contained in:
AdrienLSH
2024-04-07 11:13:45 +02:00
parent 981b66f221
commit 5f6909dfb9
2 changed files with 4 additions and 2 deletions

View File

@ -140,8 +140,9 @@ window.addEventListener("popstate", function() {router(location.pathname);});
document.addEventListener("DOMContentLoaded", async () => {
document.body.addEventListener("click", e => {
if (e.target.classList.contains('nav-link')) {
document.querySelector('[data-link].active')?.classList.remove('active');
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'))
e.target.classList.add('active');
navigateTo(e.target.href.slice(location.origin.length));