From 36963a2839b33121de235c5e16743e508a52b9ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Sun, 7 Sep 2025 15:32:45 +0200 Subject: feat(now): modify how links are handled --- index.ts | 9 --------- 1 file changed, 9 deletions(-) (limited to 'index.ts') diff --git a/index.ts b/index.ts index e48401f..68b6f19 100644 --- a/index.ts +++ b/index.ts @@ -1,13 +1,4 @@ function setupEvents() { - document.querySelectorAll(".tag")?.forEach(t => { - t.addEventListener("click", _ => { - const link = t.getAttribute("data-href") - if (link === null || link === "") return - if (!link.startsWith(window.location.origin) && link.startsWith("https://")) window.open(link) - else changePage(link) - }) - }) - document.querySelectorAll("a")?.forEach(a => { a.addEventListener("click", e => { if (!a.href.startsWith(window.location.origin)) return -- cgit v1.2.3