aboutsummaryrefslogtreecommitdiff
path: root/static/fluoride.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/fluoride.js')
-rw-r--r--static/fluoride.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/static/fluoride.js b/static/fluoride.js
index 9cf318b..8244d80 100644
--- a/static/fluoride.js
+++ b/static/fluoride.js
@@ -136,6 +136,11 @@ function isInView(el) {
}
function replyToLinkLocal(a) {
+ if (!a)
+ return;
+ var id = a.getAttribute("href");
+ if (!id || id[0] != "#")
+ return;
a.onmouseenter = function(event) {
var id = event.target.getAttribute("href");
var status = document.querySelector(id);
@@ -260,8 +265,9 @@ function handleReplyLink(a) {
function handleStatusLink(a) {
if (a.classList.contains("mention"))
- return;
- a.target = "_blank";
+ a.removeAttribute("target");
+ else
+ a.target = "_blank";
}
document.addEventListener("DOMContentLoaded", function() {
@@ -292,6 +298,11 @@ document.addEventListener("DOMContentLoaded", function() {
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