aboutsummaryrefslogtreecommitdiff
path: root/index.ts
diff options
context:
space:
mode:
authorWilliam Hergès <william@herges.fr>2025-10-03 17:21:29 +0200
committerWilliam Hergès <william@herges.fr>2025-10-03 17:21:29 +0200
commit270f592fc65cd5553ccf7c0dc81431c3efdf67ab (patch)
tree4c1c53f3c40b6324201dda10a8c30c7438fcbde7 /index.ts
parented216fcfbd19d97f35292ceb9af77aab989446b0 (diff)
feat(frontend): bundle htmx and set every external link to target blank
Diffstat (limited to 'index.ts')
-rw-r--r--index.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/index.ts b/index.ts
index f67b2c6..72679ce 100644
--- a/index.ts
+++ b/index.ts
@@ -1 +1,6 @@
-console.log("Hello via Bun!"); \ No newline at end of file
+import 'htmx.org';
+
+document.querySelectorAll("a").forEach(e => {
+ if (e.href.startsWith(window.location.origin)) return;
+ e.target = "_blank";
+});