mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2024-12-22 11:23:33 +02:00
fluoride: Use target=_blank for status links
This commit is contained in:
parent
626369c317
commit
1936044137
1 changed files with 11 additions and 0 deletions
|
@ -186,6 +186,12 @@ function handleReplyLink(div) {
|
|||
}
|
||||
}
|
||||
|
||||
function handleStatusLink(a) {
|
||||
if (a.classList.contains("mention"))
|
||||
return;
|
||||
a.target = "_blank";
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
var statuses = document.querySelectorAll(".status-container");
|
||||
for (var i = 0; i < statuses.length; i++) {
|
||||
|
@ -205,6 +211,11 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||
for (var j = 0; j < replyLinks.length; j++) {
|
||||
handleReplyLink(replyLinks[j]);
|
||||
}
|
||||
|
||||
var links = s.querySelectorAll(".status-content a");
|
||||
for (var j = 0; j < links.length; j++) {
|
||||
handleStatusLink(links[j]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue