1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
document$.subscribe(function() { const IGNORED_PATHS = [] for (const ignoredPath of IGNORED_PATHS) { if (window.location.pathname.match(`(\/${ignoredPath}[\/?].*)`)) { return; } } let links = document.getElementsByTagName("a"); for (const link of links) { if (link.hostname !== window.location.hostname) { link.target = "_blank"; } } })