From 37b1c750454a780ef31a26d19005e5c94a39ae9b Mon Sep 17 00:00:00 2001 From: r Date: Sat, 14 Nov 2020 17:58:34 +0000 Subject: [PATCH] Fix link targets --- static/fluoride.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/static/fluoride.js b/static/fluoride.js index c1eb06f..36a374f 100644 --- a/static/fluoride.js +++ b/static/fluoride.js @@ -200,8 +200,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() { @@ -232,6 +233,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