aboutsummaryrefslogtreecommitdiff
path: root/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'index.ts')
-rw-r--r--index.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/index.ts b/index.ts
index 77a004a..e4b19d6 100644
--- a/index.ts
+++ b/index.ts
@@ -1,7 +1,9 @@
function setupEvents() {
document.querySelectorAll<HTMLElement>(".tag")?.forEach(t => {
t.addEventListener("click", _ => {
- // t.classList.toggle("active")
+ const link = t.getAttribute("data-href")
+ if (link === null || link === "") return
+ window.open(link)
})
})