Fix McClatchy Group (identify site)

This commit is contained in:
magnolia1234 2022-07-26 18:20:19 +02:00
parent 4abdf851f6
commit 38e13fe847
4 changed files with 7 additions and 4 deletions

View file

@ -883,8 +883,8 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
// block script for additional McClatchy sites (opt-in to custom sites) // block script for additional McClatchy sites (opt-in to custom sites)
var usa_mcc_domains = grouped_sites['###_usa_mcc']; var usa_mcc_domains = grouped_sites['###_usa_mcc'];
var usa_mcc_domain = (((matchUrlDomain('mcclatchyinteractive.com', details.url) && ['script'].includes(details.type)) || var usa_mcc_domain = (((matchUrlDomain('mcclatchyinteractive.com', details.url) && ['script'].includes(details.type)) ||
(matchUrlDomain('mcclatchy-wires.com', details.url) && ['image'].includes(details.type))) && (matchUrlDomain('mcclatchy.com', details.url) && ['image'].includes(details.type))) &&
!matchUrlDomain(usa_mcc_domains, header_referer) && enabledSites.includes('###_usa_mcc')); !matchUrlDomain(usa_mcc_domains.concat(['mcclatchy.com']), header_referer) && enabledSites.includes('###_usa_mcc'));
if (usa_mcc_domain) if (usa_mcc_domain)
usa_mcc_domains = customAddRules(usa_mcc_domains, '', blockedRegexes['bnd.com']); usa_mcc_domains = customAddRules(usa_mcc_domains, '', blockedRegexes['bnd.com']);
else { else {

View file

@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox
Post-release Post-release
Le Soleil - Quebec (+ regional/opt-in to custom sites) Le Soleil - Quebec (+ regional/opt-in to custom sites)
Fix McClatchy Group (identify site)
* v2.7.7.0 (2022-07-24) * v2.7.7.0 (2022-07-24)
Add Saltwire Network (Canada) Add Saltwire Network (Canada)

View file

@ -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) if (!domain)
domain = document.domain.replace(/(account|amp)\./, ''); domain = document.domain.replace(/(account|amp)\./, '');
let url = window.location.href; let url = window.location.href;

View file

@ -679,7 +679,7 @@
"*://*.gitlab.com/magnolia1234/*", "*://*.gitlab.com/magnolia1234/*",
"*://*.hearstnp.com/*", "*://*.hearstnp.com/*",
"*://*.loader-cdn.azureedge.net/*", "*://*.loader-cdn.azureedge.net/*",
"*://*.mcclatchy-wires.com/*", "*://*.mcclatchy.com/*",
"*://*.mcclatchyinteractive.com/*", "*://*.mcclatchyinteractive.com/*",
"*://*.natgeofe.com/*", "*://*.natgeofe.com/*",
"*://*.ndcmediagroep.nl/*", "*://*.ndcmediagroep.nl/*",