Fix link targets

This commit is contained in:
r 2020-11-14 17:58:34 +00:00
parent c3d90539e9
commit 37b1c75045

View File

@ -200,8 +200,9 @@ function handleReplyLink(a) {
function handleStatusLink(a) { function handleStatusLink(a) {
if (a.classList.contains("mention")) if (a.classList.contains("mention"))
return; a.removeAttribute("target");
a.target = "_blank"; else
a.target = "_blank";
} }
document.addEventListener("DOMContentLoaded", function() { document.addEventListener("DOMContentLoaded", function() {
@ -232,6 +233,11 @@ document.addEventListener("DOMContentLoaded", function() {
handleStatusLink(links[j]); handleStatusLink(links[j]);
} }
} }
var links = document.querySelectorAll(".user-profile-decription a");
for (var j = 0; j < links.length; j++) {
links[j].target = "_blank";
}
}); });
// @license-end // @license-end