Update externallinks.js

This commit is contained in:
simonpipe 2026-05-28 09:24:49 +02:00
parent abd0a2d89e
commit 39c03d4eb6

View file

@ -1,4 +1,3 @@
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)) {
@ -6,4 +5,3 @@ document.addEventListener('DOMContentLoaded', function() {
link.setAttribute('rel', 'noopener noreferrer');
}
});
});