From c36314fe7fe6ee5fa75b29930214b56c40e8e46d Mon Sep 17 00:00:00 2001 From: r Date: Wed, 30 Mar 2022 17:12:53 +0000 Subject: [PATCH] fluoride: Use target=_blank for user field links --- static/fluoride.js | 2 +- templates/user.tmpl | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/static/fluoride.js b/static/fluoride.js index 6f14f86..ddf74c6 100644 --- a/static/fluoride.js +++ b/static/fluoride.js @@ -298,7 +298,7 @@ document.addEventListener("DOMContentLoaded", function() { } } - var links = document.querySelectorAll(".user-profile-decription a"); + var links = document.querySelectorAll(".user-profile-decription a, .user-fields a"); for (var j = 0; j < links.length; j++) { links[j].target = "_blank"; } diff --git a/templates/user.tmpl b/templates/user.tmpl index fd838b9..dccce7c 100644 --- a/templates/user.tmpl +++ b/templates/user.tmpl @@ -131,9 +131,13 @@
{{EmojiFilter .User.Note .User.Emojis | Raw}}
- {{if .User.Fields}}{{range .User.Fields}} -
{{.Name}} - {{.Value | Raw}}
- {{end}}{{end}} + {{if .User.Fields}} +
+ {{range .User.Fields}} +
{{.Name}} - {{.Value | Raw}}
+ {{end}} +
+ {{end}}