Add Lee Enterprises Group (local USA)

This commit is contained in:
magnolia1234 2021-10-09 19:41:35 +02:00
parent 84b87c2ea0
commit cc7ccd2347
5 changed files with 32 additions and 4 deletions

View file

@ -189,6 +189,11 @@ Grouped in options:\
[Milwaukee Journal Sentinel](https://www.jsonline.com) -
[The Indianapolis Star](https://www.indystar.com) -
[The Record (North Jersey)](https://www.northjersey.com)\
*Lee Enterprises Group* sites like (opt-in to custom sites for unlisted)\
[Arizona Daily Star](https://tucson.com) -
[Richmond Times-Dispatch](https://richmond.com) -
[The Buffalo News](https://buffalonews.com) -
[Tulsa World](https://tulsaworld.com)\
*McClatchy Group* sites like (opt-in to custom sites for unlisted)\
[Belleville News-Democrat](https://www.bnd.com) -
[Fort Worth Star-Telegram](https://www.star-telegram.com) -

View file

@ -472,6 +472,7 @@ var grouped_sites = {
'###_no_nhst_media': no_nhst_media_domains,
'###_timesofindia': timesofindia_domains,
'###_usa_craincomm': usa_craincomm_domains,
'###_usa_lee_ent': usa_lee_ent_domains,
'###_usa_mcc': usa_mcc_domains,
'###_usa_mng': usa_mng_domains,
'###_usa_nymag': usa_nymag_domains,
@ -593,6 +594,10 @@ function add_grouped_sites(init_rules) {
allow_cookies.push(domain);
blockedRegexes[domain] = new RegExp('(\.tinypass\.com\/|\.' + domain + '\/.+\/js\/js_.+\.js)');
}
for (let domain of usa_lee_ent_domains) {
allow_cookies.push(domain);
blockedRegexes[domain] = new RegExp('\.' + domain + '\/shared-content\/art\/tncms\/user\/user\.js');
}
for (let domain of usa_mcc_domains)
blockedRegexes[domain] = /(js\.matheranalytics\.com\/|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/;
for (let domain of usa_tribune_domains) {
@ -1021,7 +1026,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", "*://cdn.ampproject.org/v*/amp-subscriptions-*.js", "*://loader-cdn.azureedge.net/prod/*/loader.min.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", "*://loader-cdn.azureedge.net/prod/*/loader.min.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);
@ -1108,6 +1113,17 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
enabledSites.push(gn_domain);
}
// block script for additional Lee Enterprises sites (opt-in to custom sites)
var usa_lee_ent_domain = (details.url.match(/\.com\/shared-content\/art\/tncms\/.+\.js/) && ['script'].includes(details.type) &&
!matchUrlDomain(usa_lee_ent_domains, header_referer) && enabledSites.includes('###_usa_lee_ent'));
if (usa_lee_ent_domain) {
let lee_ent_domain = urlHost(header_referer).replace(/^(www|m)\./, '');
blockedRegexes[lee_ent_domain] = /\.com\/shared-content\/art\/tncms\/user\/user.js/;
usa_lee_ent_domains.push(lee_ent_domain);
if (!enabledSites.includes(lee_ent_domain))
enabledSites.push(lee_ent_domain);
}
// 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('mcclatchy-wires.com', details.url) && ['image'].includes(details.type)) &&

View file

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Add Lee Enterprises Group (local USA)
Fix Chronicle of Higher Education
Fix El Pais (amp/videos)
Fix Times Higher Education

View file

@ -97,6 +97,7 @@
"*://*.braunschweiger-zeitung.de/*",
"*://*.brisbanetimes.com.au/*",
"*://*.britannica.com/*",
"*://*.buffalonews.com/*",
"*://*.business-standard.com/*",
"*://*.businessinsider.com/*",
"*://*.businessoffashion.com/*",
@ -186,8 +187,8 @@
"*://*.financialpost.com/*",
"*://*.firstthings.com/*",
"*://*.fnlondon.com/*",
"*://*.forbes.com/*",
"*://*.folha.uol.com.br/*",
"*://*.forbes.com/*",
"*://*.foreignaffairs.com/*",
"*://*.foreignpolicy.com/*",
"*://*.fortune.com/*",
@ -402,6 +403,7 @@
"*://*.reuters.com/*",
"*://*.rhein-zeitung.de/*",
"*://*.rheinpfalz.de/*",
"*://*.richmond.com/*",
"*://*.rollingstone.com/*",
"*://*.ruhrnachrichten.de/*",
"*://*.sacbee.com/*",
@ -496,6 +498,8 @@
"*://*.tri-cityherald.com/*",
"*://*.trouw.nl/*",
"*://*.tubantia.nl/*",
"*://*.tucson.com/*",
"*://*.tulsaworld.com/*",
"*://*.twincities.com/*",
"*://*.upstreamonline.com/*",
"*://*.usatoday.com/*",
@ -561,5 +565,5 @@
"*://*.wallkit.net/*",
"*://*.wsj.net/*"
],
"version": "2.3.8.3"
"version": "2.3.8.4"
}

View file

@ -146,6 +146,7 @@ var defaultSites =
"Le Parisien": "leparisien.fr",
"Le Scienze": "lescienze.it",
"Le Télégramme": "letelegramme.fr",
"Lee Enterprises Group": "###_usa_lee_ent",
"Leeuwarder Courant": "lc.nl",
"Les Échos": "lesechos.fr",
"Libération (free articles only)": "liberation.fr",
@ -347,6 +348,7 @@ const no_nhst_media_domains = ['intrafish.com', 'rechargenews.com', 'tradewindsn
const timesofindia_domains = ['timesofindia.com', 'timesofindia.indiatimes.com'];
const usa_craincomm_domains = ['adage.com', 'autonews.com', 'chicagobusiness.com', 'crainscleveland.com', 'crainsdetroit.com', 'crainsnewyork.com', 'modernhealthcare.com'];
const usa_gannett_domains = [];
const usa_lee_ent_domains = ['buffalonews.com', 'richmond.com', 'tucson.com', 'tulsaworld.com'];
const usa_mcc_domains = ['bnd.com', 'charlotteobserver.com', 'fresnobee.com', 'kansas.com', 'kansascity.com', 'kentucky.com', 'miamiherald.com', 'newsobserver.com', 'sacbee.com', 'star-telegram.com', 'thestate.com', 'tri-cityherald.com'];
const usa_mng_domains = ['denverpost.com', 'eastbaytimes.com', 'mercurynews.com', 'ocregister.com', 'pe.com', 'twincities.com'];
const usa_nymag_domains = ['curbed.com', 'grubstreet.com', 'nymag.com', 'thecut.com', 'vulture.com'];
@ -354,4 +356,4 @@ const usa_tribune_domains = ['baltimoresun.com', 'chicagotribune.com', 'courant.
const usa_theathletic_domains = ['theathletic.com', 'theathletic.co.uk'];
var defaultSites_grouped_domains = Object.values(defaultSites);
var defaultSites_domains = defaultSites_grouped_domains.concat(au_comm_media_domains, au_news_corp_domains, au_prov_news_domains, br_folha_domains, ca_torstar_domains, de_funke_media_domains, de_madsack_domains, economictimes_domains, es_epiberica_domains, es_grupo_vocento_domains, fi_alma_talent_domains, fi_sanoma_domains, fr_be_groupe_rossel_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, it_ilmessaggero_domains, it_quotidiano_domains, nl_ad_region_domains, nl_mediahuis_region_domains, no_nhst_media_domains, timesofindia_domains, usa_craincomm_domains, usa_mcc_domains, usa_mng_domains, usa_nymag_domains, usa_tribune_domains, usa_theathletic_domains);
var defaultSites_domains = defaultSites_grouped_domains.concat(au_comm_media_domains, au_news_corp_domains, au_prov_news_domains, br_folha_domains, ca_torstar_domains, de_funke_media_domains, de_madsack_domains, economictimes_domains, es_epiberica_domains, es_grupo_vocento_domains, fi_alma_talent_domains, fi_sanoma_domains, fr_be_groupe_rossel_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, it_ilmessaggero_domains, it_quotidiano_domains, nl_ad_region_domains, nl_mediahuis_region_domains, no_nhst_media_domains, timesofindia_domains, usa_craincomm_domains, usa_lee_ent_domains, usa_mcc_domains, usa_mng_domains, usa_nymag_domains, usa_tribune_domains, usa_theathletic_domains);