1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-12 15:15:45 +02:00

Fix invalid links (such as account names a tweet replied to) being clickable in notifications

This commit is contained in:
chylex 2017-04-13 19:31:55 +02:00
parent 38d6d93f65
commit 0d32c168eb

View File

@ -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() : "";