aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--static/fluoride.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/static/fluoride.js b/static/fluoride.js
index 700d980..a150b2b 100644
--- a/static/fluoride.js
+++ b/static/fluoride.js
@@ -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]);
+ }
}
});