diff --git a/background.js b/background.js index 7ce47f4..46d805b 100644 --- a/background.js +++ b/background.js @@ -883,8 +883,8 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) { // block script for additional McClatchy sites (opt-in to custom sites) var usa_mcc_domains = grouped_sites['###_usa_mcc']; var usa_mcc_domain = (((matchUrlDomain('mcclatchyinteractive.com', details.url) && ['script'].includes(details.type)) || - (matchUrlDomain('mcclatchy-wires.com', details.url) && ['image'].includes(details.type))) && - !matchUrlDomain(usa_mcc_domains, header_referer) && enabledSites.includes('###_usa_mcc')); + (matchUrlDomain('mcclatchy.com', details.url) && ['image'].includes(details.type))) && + !matchUrlDomain(usa_mcc_domains.concat(['mcclatchy.com']), header_referer) && enabledSites.includes('###_usa_mcc')); if (usa_mcc_domain) usa_mcc_domains = customAddRules(usa_mcc_domains, '', blockedRegexes['bnd.com']); else { diff --git a/changelog.txt b/changelog.txt index 6c7a46e..8a5b342 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release Le Soleil - Quebec (+ regional/opt-in to custom sites) +Fix McClatchy Group (identify site) * v2.7.7.0 (2022-07-24) Add Saltwire Network (Canada) diff --git a/contentScript.js b/contentScript.js index f40ee1d..3d4202b 100644 --- a/contentScript.js +++ b/contentScript.js @@ -4062,7 +4062,9 @@ else if (matchDomain(usa_lee_ent_domains) || (window.location.pathname.endsWith( } } -else if ((domain = matchDomain(usa_mcc_domains)) || document.querySelector('script[src^="https://media.mcclatchyinteractive.com/"]') || (window.location.href.match(/\/\/amp\..+\.com\/(.+\/)?article(\d){8,}\.html/) && document.querySelector('a[href^="https://classifieds.mcclatchy.com/"]'))) { +else if ((domain = matchDomain(usa_mcc_domains)) || + (window.location.hostname.startsWith('account.') && document.querySelector('script[src*=".mcclatchyinteractive.com/"]')) || + (window.location.href.match(/\/\/amp\..+\.com\/(.+\/)?article(\d){8,}\.html/) && document.querySelector('a[href^="https://classifieds.mcclatchy.com/"]'))) { if (!domain) domain = document.domain.replace(/(account|amp)\./, ''); let url = window.location.href; diff --git a/manifest.json b/manifest.json index 3cc5f3e..7e53c71 100644 --- a/manifest.json +++ b/manifest.json @@ -679,7 +679,7 @@ "*://*.gitlab.com/magnolia1234/*", "*://*.hearstnp.com/*", "*://*.loader-cdn.azureedge.net/*", - "*://*.mcclatchy-wires.com/*", + "*://*.mcclatchy.com/*", "*://*.mcclatchyinteractive.com/*", "*://*.natgeofe.com/*", "*://*.ndcmediagroep.nl/*",