mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 07:17:47 +01:00
Fix group McClatchy (unlisted sites)
This commit is contained in:
parent
72b957b2d9
commit
15543ae001
4 changed files with 12 additions and 7 deletions
|
@ -976,7 +976,7 @@ ext_api.webRequest.onHeadersReceived.addListener(function (details) {
|
|||
},
|
||||
['blocking', 'responseHeaders']);
|
||||
|
||||
var block_js_default = ["*://cdn.tinypass.com/*", "*://*.piano.io/*", "*://*.poool.fr/*", "*://cdn.ampproject.org/v*/amp-access-*.js", "*://*.blueconic.net/*", "*://*.cxense.com/*", "*://*.evolok.net/*", "*://js.matheranalytics.com/*", "*://*.newsmemory.com/*", "*://*.onecount.net/*", "*://js.pelcro.com/*", "*://*.qiota.com/*", "*://*.tribdss.com/*"];
|
||||
var block_js_default = ["*://cdn.tinypass.com/*", "*://*.piano.io/*", "*://*.poool.fr/*", "*://cdn.ampproject.org/v*/amp-access-*.js", "*://cdn.ampproject.org/v*/amp-subscriptions-*.js", "*://*.blueconic.net/*", "*://*.cxense.com/*", "*://*.evolok.net/*", "*://js.matheranalytics.com/*", "*://*.newsmemory.com/*", "*://*.onecount.net/*", "*://js.pelcro.com/*", "*://*.qiota.com/*", "*://*.tribdss.com/*"];
|
||||
var block_js_custom = [];
|
||||
var block_js_custom_ext = [];
|
||||
var block_js = block_js_default.concat(block_js_custom);
|
||||
|
@ -1062,11 +1062,13 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
|||
}
|
||||
|
||||
// block script for additional McClatchy sites (opt-in to custom sites)
|
||||
var usa_mcc_domain = (matchUrlDomain('mcclatchyinteractive.com', details.url) && ['script'].includes(details.type) && !matchUrlDomain(usa_mcc_domains, header_referer) && enabledSites.includes('###_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'));
|
||||
if (usa_mcc_domain) {
|
||||
let mcc_domain = urlHost(header_referer).replace('account.', '');
|
||||
let mcc_domain = urlHost(header_referer).replace(/^(account|amp)\./, '');
|
||||
if (!usa_mcc_domains.includes(mcc_domain)) {
|
||||
blockedRegexes[domain] = /(js\.matheranalytics\.com\/|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/;
|
||||
blockedRegexes[mcc_domain] = /(js\.matheranalytics\.com\/|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/;
|
||||
usa_mcc_domains.push(mcc_domain);
|
||||
if (!enabledSites.includes(mcc_domain))
|
||||
enabledSites.push(mcc_domain);
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
Changelog Bypass Paywalls Clean - Firefox
|
||||
|
||||
Post-release
|
||||
Fix group McClatchy (unlisted sites)
|
||||
Fix MediaNama (modal)
|
||||
|
||||
* v2.3.2.0 (2021-08-08)
|
||||
|
|
|
@ -2754,7 +2754,7 @@ else if (matchDomain('wsj.com') && !matchDomain('cn.wsj.com')) {
|
|||
}
|
||||
}
|
||||
|
||||
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/)) {
|
||||
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/"]'))) {
|
||||
if (!domain)
|
||||
domain = document.domain.replace(/(account|amp)\./, '');
|
||||
let url = window.location.href;
|
||||
|
@ -2855,7 +2855,6 @@ function matchDomain(domains, hostname) {
|
|||
return matched_domain;
|
||||
}
|
||||
|
||||
// add domains to manifest (content_scripts - matches)
|
||||
function replaceDomElementExt(url, proxy, base64, selector, text_fail = '') {
|
||||
let proxyurl = proxy ? 'https://bpc2-cors-anywhere.herokuapp.com/' : '';
|
||||
fetch(proxyurl + url, {headers: {"Content-Type": "text/plain", "X-Requested-With": "XMLHttpRequest"} })
|
||||
|
|
|
@ -533,14 +533,17 @@
|
|||
"*://*.jsdelivr.net/*",
|
||||
"*://*.lightboxcdn.com/*",
|
||||
"*://*.loader-cdn.azureedge.net/*",
|
||||
"*://*.mcclatchy-wires.com/*",
|
||||
"*://*.mcclatchyinteractive.com/*",
|
||||
"*://*.natgeofe.com/*",
|
||||
"*://*.nyt.com/*",
|
||||
"*://*.pasedigital.cl/*",
|
||||
"*://*.rcsobjects.it/*",
|
||||
"*://*.repstatic.it/*",
|
||||
"*://*.rndtech.de/*",
|
||||
"*://*.userzoom.com/*",
|
||||
"*://*.wallkit.net/*",
|
||||
"*://*.wsj.net/*"
|
||||
],
|
||||
"version": "2.3.2.1"
|
||||
"version": "2.3.2.2"
|
||||
}
|
Loading…
Reference in a new issue