Block external links.

This commit is contained in:
CalDescent 2023-03-31 13:03:46 +01:00
parent 7392082875
commit 85735fabb2

View File

@ -348,6 +348,10 @@ function interceptClickEvent(e) {
} }
e.preventDefault(); e.preventDefault();
} }
else if (href.startsWith("http://") || href.startsWith("https://") || href.startsWith("//")) {
// Block external links
e.preventDefault();
}
} }
if (document.addEventListener) { if (document.addEventListener) {
document.addEventListener('click', interceptClickEvent); document.addEventListener('click', interceptClickEvent);