From 293ddacd1939435122ec175edf58288c8c8f2acd Mon Sep 17 00:00:00 2001 From: chylex <info@chylex.com> Date: Thu, 6 Apr 2017 14:07:48 +0200 Subject: [PATCH] Disable broken TweetDeck metrics --- Resources/Scripts/code.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Resources/Scripts/code.js b/Resources/Scripts/code.js index 13098351..6f886141 100644 --- a/Resources/Scripts/code.js +++ b/Resources/Scripts/code.js @@ -625,6 +625,21 @@ TD.services.TwitterMedia.YOUTUBE_RE = new RegExp(TD.services.TwitterMedia.YOUTUBE_LONG_RE.source+"|"+TD.services.TwitterMedia.YOUTUBE_TINY_RE.source); TD.services.TwitterMedia.SERVICES["youtube"] = TD.services.TwitterMedia.YOUTUBE_RE; + // + // Block: Disable TweetDeck metrics. + // + TD.metrics.inflate = function(){}; + TD.metrics.inflateMetricTriple = function(){}; + TD.metrics.log = function(){}; + TD.metrics.makeKey = function(){}; + TD.metrics.send = function(){}; + + onAppReady.push(function(){ + let data = $._data(window); + delete data.events["metric"]; + delete data.events["metricsFlush"]; + }); + // // Block: Register the TD.ready event, finish initialization, and load plugins. //