Fix link targets
authorr <r@freesoftwareextremist.com>
Sat, 14 Nov 2020 17:58:34 +0000 (17:58 +0000)
committerr <r@freesoftwareextremist.com>
Sat, 14 Nov 2020 17:58:34 +0000 (17:58 +0000)
static/fluoride.js

index c1eb06ff11fa6b4cfb52aafe00505c233793c848..36a374f62b5e415f4cbe0aa174d919c152717443 100644 (file)
@@ -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