aboutsummaryrefslogtreecommitdiff
path: root/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'index.ts')
-rw-r--r--index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/index.ts b/index.ts
index c3f46b0..e1feaec 100644
--- a/index.ts
+++ b/index.ts
@@ -3,7 +3,8 @@ function setupEvents() {
t.addEventListener("click", _ => {
const link = t.getAttribute("data-href")
if (link === null || link === "") return
- window.open(link)
+ if (!link.startsWith(window.location.origin) && link.startsWith("https://")) window.open(link)
+ else changePage(link)
})
})