Fix McClatchy Group (identify site)

merge-requests/8/head
magnolia1234 2 years ago
parent 4abdf851f6
commit 38e13fe847

@ -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 {

@ -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)

@ -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;

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

Loading…
Cancel
Save