From d3b1ca333c5a3685ada8d1afddb0030edfdf60b8 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 7 Jul 2021 10:52:16 -0400 Subject: [PATCH] Make getByName() return an dummy Tracker object Related issue: - https://www.reddit.com/r/uBlockOrigin/comments/o44syz/ublock_origin_136_announcement_thread/h4big1n/ --- src/web_accessible_resources/google-analytics_analytics.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/web_accessible_resources/google-analytics_analytics.js b/src/web_accessible_resources/google-analytics_analytics.js index 0b6b7d569..2875e1d54 100644 --- a/src/web_accessible_resources/google-analytics_analytics.js +++ b/src/web_accessible_resources/google-analytics_analytics.js @@ -24,9 +24,6 @@ // https://developers.google.com/analytics/devguides/collection/analyticsjs/ const noopfn = function() { }; - const noopnullfn = function() { - return null; - }; // const Tracker = function() { }; @@ -64,7 +61,9 @@ ga.create = function() { return new Tracker(); }; - ga.getByName = noopnullfn; + ga.getByName = function() { + return new Tracker(); + }; ga.getAll = function() { return []; };