diff options
| author | Anhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me> | 2024-11-14 15:35:21 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me> | 2024-11-14 15:35:21 +0100 |
| commit | 44173f34c293d011019b84be7095039eac977c5b (patch) | |
| tree | 7f6259d439c0eb6b25e2e73c24fb5dd7a63edccf /index.ts | |
| parent | 2621bc5978fc7f6f24d2f0ba91715c01c62b43a9 (diff) | |
feat(tag): link
Diffstat (limited to 'index.ts')
| -rw-r--r-- | index.ts | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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) }) }) |
