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.
This commit is contained in:
magnolia1234 2019-12-13 13:57:04 +01:00 committed by GitHub
parent a27b1e60a9
commit 4fd51e2c97

View file

@ -446,7 +446,7 @@ browser.webRequest.onCompleted.addListener(function(details) {
function isSiteEnabled(details) { function isSiteEnabled(details) {
var isEnabled = enabledSites.some(function(enabledSite) { 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) { if (enabledSite in restrictions) {
return useSite && details.url.indexOf(restrictions[enabledSite]) !== -1; return useSite && details.url.indexOf(restrictions[enabledSite]) !== -1;
} }