11 lines
No EOL
347 B
JavaScript
11 lines
No EOL
347 B
JavaScript
document.onreadystatechange = function () {
|
|
document.querySelectorAll("a").forEach((element) => {
|
|
let href = element.href;
|
|
if(href.indexOf(location.hostname) === -1){
|
|
console.log(href);
|
|
element.target = "_blank";
|
|
}
|
|
});
|
|
|
|
document.querySelector(".loader").style.display = "none";
|
|
} |