Add Postmedia Network (Canada)

This commit is contained in:
magnolia1234 2022-02-25 14:25:53 +01:00
parent 6ecb60e815
commit 7144f05a03
6 changed files with 45 additions and 20 deletions

View file

@ -278,12 +278,20 @@ Grouped in options:\
[The Virginian-Pilot](https://www.pilotonline.com)
#### Canada
[Financial Post](https://www.financialpost.com) -
[Le Devoir](https://www.ledevoir.com) -
[National Post](https://www.nationalpost.com) -
[The Globe and Mail](https://www.theglobeandmail.com) -
[The Hill Times](https://www.hilltimes.com)\
[The Toronto Star](https://www.thestar.com) and regional TorStar sites (grouped in options) like
Grouped in options:\
*Postmedia Network* sites like (opt-in to custom sites for unlisted)\
[Calgary Herald](https://calgaryherald.com) -
[Financial Post](https://www.financialpost.com) -
[National Post](https://www.nationalpost.com) -
[The Province](https://theprovince.com) -
[Toronto Sun](https://torontosun.com) -
[Vancouver Sun](https://vancouversun.com)\
*TorStar* sites like\
[The Toronto Star](https://www.thestar.com) and regional sites
[Niagara Falls Review](https://www.niagarafallsreview.ca) -
[Peterborough Examiner](https://www.thepeterboroughexaminer.com) -
[St. Catharines Standard](https://www.stcatharinesstandard.ca) -

View file

@ -781,7 +781,20 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
enabledSites.push(sanoma_domain);
}
} else if (header_referer_hostname.match(/\.(com|org)$/)) {
} else if (header_referer_hostname.match(/\.(ca|com|org)$/)) {
// block TinyPass for Postmedia Network sites
var ca_postmedia_domains = grouped_sites['###_ca_postmedia'];
var ca_postmedia_domain = (matchUrlDomain('postmedia.digital', details.url) && ['image'].includes(details.type) && !matchUrlDomain(ca_postmedia_domains.concat(['canada.com', 'canoe.com', 'driving.ca']), header_referer) && enabledSites.includes('###_ca_postmedia'));
if (ca_postmedia_domain) {
let pm_domain = urlHost(header_referer).replace(/^(www)\./, '');
if (!allow_cookies.includes(pm_domain))
allow_cookies.push(pm_domain);
blockedRegexes[pm_domain] = blockedRegexes['nationalpost.com'];
ca_postmedia_domains.push(pm_domain);
if (!enabledSites.includes(pm_domain))
enabledSites.push(pm_domain);
}
// set googlebot-useragent for Gannett sites
var usa_gannett_domains = grouped_sites['###_usa_gannett'];

View file

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Add Postmedia Network (Canada)
Fix Westfalen-Blatt (gallery)
Fix update check (GitLab CORS issue or BitBucket http error 429)
Update custom sites (load text from json)

View file

@ -33,11 +33,6 @@
"Brainly.com": {
"domain": "brainly.com"
},
"Calgaryherald.com": {
"allow_cookies": 1,
"block_regex": "\\.tinypass\\.com\\/",
"domain": "calgaryherald.com"
},
"Capital.bg": {
"allow_cookies": 1,
"domain": "capital.bg",

View file

@ -106,6 +106,7 @@
"*://*.businessinsider.com/*",
"*://*.businessoffashion.com/*",
"*://*.cairnspost.com.au/*",
"*://*.calgaryherald.com/*",
"*://*.canberratimes.com.au/*",
"*://*.capitalgazette.com/*",
"*://*.cen.acs.org/*",
@ -518,6 +519,7 @@
"*://*.thenewatlantis.com/*",
"*://*.thepeterboroughexaminer.com/*",
"*://*.thepointmag.com/*",
"*://*.theprovince.com/*",
"*://*.therecord.com/*",
"*://*.thesaturdaypaper.com.au/*",
"*://*.thespec.com/*",
@ -533,6 +535,7 @@
"*://*.timesofindia.indiatimes.com/*",
"*://*.tivi.fi/*",
"*://*.tlz.de/*",
"*://*.torontosun.com/*",
"*://*.towardsdatascience.com/*",
"*://*.townnews.com/*",
"*://*.townsvillebulletin.com.au/*",
@ -550,6 +553,7 @@
"*://*.usinenouvelle.com/*",
"*://*.uusisuomi.fi/*",
"*://*.valeursactuelles.com/*",
"*://*.vancouversun.com/*",
"*://*.vanityfair.com/*",
"*://*.variety.com/*",
"*://*.varmatin.com/*",
@ -613,6 +617,7 @@
"*://*.natgeofe.com/*",
"*://*.nyt.com/*",
"*://*.pasedigital.cl/*",
"*://*.postmedia.digital/*",
"*://*.prcdn.co/*",
"*://*.repstatic.it/*",
"*://*.rndtech.de/*",
@ -620,5 +625,5 @@
"*://*.wallkit.net/*",
"*://*.wsj.net/*"
],
"version": "2.5.7.3"
"version": "2.5.7.4"
}

View file

@ -427,11 +427,6 @@ var defaultSites = {
block_regex: /cdn\.ampproject\.org\/v\d\/amp-(access|ad)-.+\.js/,
useragent: "googlebot"
},
"Financial Post": {
domain: "financialpost.com",
allow_cookies: 1,
block_regex: /\.tinypass\.com\//
},
"Financial Times (not Chinese)": {
domain: "ft.com",
allow_cookies: 1,
@ -1101,11 +1096,6 @@ var defaultSites = {
block_regex: /\.blueconic\.net\//,
random_ip: "eu"
},
"National Post": {
domain: "nationalpost.com",
allow_cookies: 1,
block_regex: /\.tinypass\.com\//
},
"National Review": {
domain: "nationalreview.com",
allow_cookies: 1,
@ -1251,6 +1241,19 @@ var defaultSites = {
domain: "politicaexterior.com",
allow_cookies: 1
},
"Postmedia Network": {
domain: "###_ca_postmedia",
group: [
"calgaryherald.com",
"financialpost.com",
"nationalpost.com",
"theprovince.com",
"torontosun.com",
"vancouversun.com"
],
allow_cookies: 1,
block_regex: /\.tinypass\.com\//
},
"Precision Oncology News": {
domain: "precisiononcologynews.com",
group_rule: "###_gr_usa_genomeweb_domains"