From 0c60e4ebfd980ca88c3fe6797836cfdfb5be4132 Mon Sep 17 00:00:00 2001 From: chylex <info@chylex.com> Date: Mon, 11 Apr 2016 20:14:07 +0200 Subject: [PATCH] Process HTML code of notifications to remove media and improve quotes --- Resources/code.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Resources/code.js b/Resources/code.js index fc43e5f1..cff5a042 100644 --- a/Resources/code.js +++ b/Resources/code.js @@ -113,7 +113,13 @@ // var onNewTweet = function(column, tweet){ var html = $(tweet.outerHTML); - html.find("footer:first").remove(); + var body = html.find(".tweet-body").first(); + + body.children("div.js-quote-detail").each(function(){ + $(this).html("(quoted tweet)"); + }); + + body.children().not("p,div.js-quote-detail").remove(); $TD.onTweetPopup(html.html(),html.find(".js-tweet-text:first").text().length); // TODO column & remove pic links from text() };