From 2a4a659e396160013a328a65edcaffc25305ebb5 Mon Sep 17 00:00:00 2001 From: chylex <contact@chylex.com> Date: Wed, 21 Jun 2017 20:35:32 +0200 Subject: [PATCH] Make retweets lowercase again --- Resources/Scripts/code.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Resources/Scripts/code.js b/Resources/Scripts/code.js index 2853da69..9bd6e1e9 100644 --- a/Resources/Scripts/code.js +++ b/Resources/Scripts/code.js @@ -682,6 +682,24 @@ }; })(); + // + // Block: Let's make retweets lowercase again. + // + TD.mustaches["status/tweet_single.mustache"] = TD.mustaches["status/tweet_single.mustache"].replace("{{_i}} Retweeted{{/i}}", "{{_i}} retweeted{{/i}}"); + + if (ensurePropertyExists(TD, "services", "TwitterActionRetweet", "prototype", "generateText")){ + TD.services.TwitterActionRetweet.prototype.generateText = appendToFunction(TD.services.TwitterActionRetweet.prototype.generateText, function(){ + this.text = this.text.replace(" Retweeted", " retweeted"); + this.htmlText = this.htmlText.replace(" Retweeted", " retweeted"); + }); + } + + if (ensurePropertyExists(TD, "services", "TwitterActionRetweetedInteraction", "prototype", "generateText")){ + TD.services.TwitterActionRetweetedInteraction.prototype.generateText = appendToFunction(TD.services.TwitterActionRetweetedInteraction.prototype.generateText, function(){ + this.htmlText = this.htmlText.replace(" Retweeted", " retweeted").replace(" Retweet", " retweet"); + }); + } + // // Block: Setup unsupported video element hook. //