diff options
| author | William Hergès <william@herges.fr> | 2025-09-07 15:32:45 +0200 |
|---|---|---|
| committer | William Hergès <william@herges.fr> | 2025-09-07 15:32:45 +0200 |
| commit | 36963a2839b33121de235c5e16743e508a52b9ea (patch) | |
| tree | 0b100d30246bf1a817a830ce2b2c5d237a330f3d /index.ts | |
| parent | e2f739c9e19f57b72b599eaf5bfc10265e62ddb8 (diff) | |
feat(now): modify how links are handled
Diffstat (limited to 'index.ts')
| -rw-r--r-- | index.ts | 9 |
1 files changed, 0 insertions, 9 deletions
@@ -1,13 +1,4 @@ function setupEvents() { - document.querySelectorAll<HTMLElement>(".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<HTMLAnchorElement>("a")?.forEach(a => { a.addEventListener("click", e => { if (!a.href.startsWith(window.location.origin)) return |
