From 4fd51e2c973c2465677858516e27e4d1832a06a0 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Fri, 13 Dec 2019 13:57:04 +0100 Subject: [PATCH] Fix ET Prime Update of function isSiteEnabled because no match with https://prime.economictimes.indiatimes.com (without dot-prefix). Dot was added to prevent site.com to match with prefixsite.com. Result: Googlebot wasn't set as user-agent. --- background.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/background.js b/background.js index f531e93a..12e66318 100644 --- a/background.js +++ b/background.js @@ -446,7 +446,7 @@ browser.webRequest.onCompleted.addListener(function(details) { function isSiteEnabled(details) { var isEnabled = enabledSites.some(function(enabledSite) { - var useSite = details.url.indexOf("." + enabledSite) !== -1; + var useSite = (details.url.indexOf("." + enabledSite) !== -1 || details.url.indexOf("/" + enabledSite) !== -1); if (enabledSite in restrictions) { return useSite && details.url.indexOf(restrictions[enabledSite]) !== -1; }