massgrave.dev/links.js
2023-03-16 11:09:16 -07:00

5 lines
169 B
JavaScript

(function() {
for (const link of document.getElementsByTagName('a')) {
if (/^(https?:)?\/\//.test(link.getAttribute('href'))) link.target = '_blank';
}
})();