diff options
Diffstat (limited to 'frontend/index.ts')
| -rw-r--r-- | frontend/index.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/frontend/index.ts b/frontend/index.ts index 9babe4a..d4fbe2a 100644 --- a/frontend/index.ts +++ b/frontend/index.ts @@ -4,10 +4,8 @@ htmx.config.historyRestoreAsHxRequest = false; function setupAnchors() { document.querySelectorAll("a").forEach(e => { - if (!e.href.startsWith(window.location.origin) && /https?:\/\//.test(e.href)) { - e.target = "_blank"; - return - } + // stuff related to external links are already handled in the backend + if (!e.href.startsWith(window.location.origin) && /https?:\/\//.test(e.href)) return if (e.hasAttribute("hx-trigger")) return; e.setAttribute("hx-get", e.href) e.setAttribute("hx-trigger", "click") |
