set rel attribute on external links to noreferrer
This commit is contained in:
parent
e44fbd85b2
commit
3b2d2631f0
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ document.onreadystatechange = function () {
|
||||||
let href = element.href;
|
let href = element.href;
|
||||||
if(href.indexOf(location.hostname) === -1){
|
if(href.indexOf(location.hostname) === -1){
|
||||||
element.target = "_blank";
|
element.target = "_blank";
|
||||||
|
element.setAttribute("rel", "noreferrer");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue