From 0d32c168ebc57cb16f2ec496ffc6bbe5471d7f4c Mon Sep 17 00:00:00 2001 From: chylex <info@chylex.com> Date: Thu, 13 Apr 2017 19:31:55 +0200 Subject: [PATCH] Fix invalid links (such as account names a tweet replied to) being clickable in notifications --- Resources/Scripts/code.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Resources/Scripts/code.js b/Resources/Scripts/code.js index 38ef79ac..349dd889 100644 --- a/Resources/Scripts/code.js +++ b/Resources/Scripts/code.js @@ -96,6 +96,10 @@ html.find(".js-media").last().remove(); // and quoted tweets still show media previews, nice nice html.find(".js-quote-detail").removeClass("is-actionable"); + html.find("a[href='#']").each(function(){ // remove <a> tags around links that don't lead anywhere (such as account names the tweet replied to) + this.outerHTML = this.innerHTML; + }); + let source = tweet.getRelatedTweet(); let duration = source ? source.text.length+(source.quotedTweet ? source.quotedTweet.text.length : 0) : tweet.text.length; let tweetUrl = source ? source.getChirpURL() : "";