From 44173f34c293d011019b84be7095039eac977c5b Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Thu, 14 Nov 2024 15:35:21 +0100 Subject: feat(tag): link --- index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'index.ts') 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(".tag")?.forEach(t => { t.addEventListener("click", _ => { - // t.classList.toggle("active") + const link = t.getAttribute("data-href") + if (link === null || link === "") return + window.open(link) }) }) -- cgit v1.2.3