From 39c03d4eb69e876d304d8a17eef875bfbd8dcf8e Mon Sep 17 00:00:00 2001 From: simonpipe Date: Thu, 28 May 2026 09:24:49 +0200 Subject: [PATCH] Update externallinks.js --- externallinks.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/externallinks.js b/externallinks.js index 024d569..d0e2afe 100644 --- a/externallinks.js +++ b/externallinks.js @@ -1,9 +1,7 @@ -document.addEventListener('DOMContentLoaded', function() { - var links = document.querySelectorAll('a[href^="https://"], a[href^="http://"]'); - links.forEach(function(link) { - if (!link.href.includes(window.location.hostname)) { - link.setAttribute('target', '_blank'); - link.setAttribute('rel', 'noopener noreferrer'); - } - }); +var links = document.querySelectorAll('a[href^="https://"], a[href^="http://"]'); +links.forEach(function(link) { + if (!link.href.includes(window.location.hostname)) { + link.setAttribute('target', '_blank'); + link.setAttribute('rel', 'noopener noreferrer'); + } }); \ No newline at end of file