Add La Croix (France)

master
magnolia1234 2020-11-26 20:17:44 +01:00
parent 86cdf94bcc
commit cd30a9faf3
6 changed files with 21 additions and 3 deletions

View File

@ -18,7 +18,7 @@ In extension developer mode you can always install BPC by `Load unpacked` (no au
* or 'whitelist' extension and install automatically updating crx-file (see next section)
1. Download this repository as a [ZIP-file from GitLab](https://gitlab.com/magnolia1234/bypass-paywalls-chrome-clean/-/archive/master/bypass-paywalls-chrome-clean-master.zip).
2. Unzip the file and you should have a folder named `magnolia1234-bypass-paywalls-chrome-clean-(commit-hash)`.
2. Unzip the file and you should have a folder named `bypass-paywalls-chrome-clean-master`.
3. Move the folder to a permanent location on your computer (do not delete the folder after installation).
4. Go to the extensions page (`chrome://extensions` or `edge://extensions`).
5. Enable Developer Mode.
@ -201,6 +201,7 @@ Visit the [Firefox repository](https://gitlab.com/magnolia1234/bypass-paywalls-f
[Charlie Hebdo](https://charliehebdo.fr) -
[L'Écho](https://lecho.be) -
[L'Opinion](https://www.lopinion.fr)
[La Croix](https://www.la-croix.com) -
[La Dépêche](https://www.ladepeche.fr)
[Le Journal du Dimanche](https://lejdd.fr)
[Le Journal du Net](https://www.journaldunet.com) -

View File

@ -58,6 +58,7 @@ var allow_cookies_default = [
'intelligentinvestor.com.au',
'knack.be',
'kurier.at',
'la-croix.com',
'lc.nl',
'lesechos.fr',
'lesoir.be',
@ -219,6 +220,7 @@ var blockedRegexes = {
'irishtimes.com': /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/,
'knack.be': /.+\.knack\.be\/js\/responsive\/rmgModal\.js/,
'kurier.at': /cdn\.tinypass\.com\/.+/,
'la-croix.com': /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/,
'ladepeche.fr': /.+\.poool\.fr\/.+/,
'lasegunda.com': /segreader\.emol\.cl\/assets\/js\/(vendor\/modal\.js|merPramV\d\.js)/,
'lastampa.it': /.+\.repstatic\.it\/minify\/sites\/lastampa\/.+\/config\.cache\.php\?name=social_js/,
@ -687,9 +689,10 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
let au_apn_site = (header_referer && (urlHost(header_referer).endsWith('com.au') || urlHost(header_referer).endsWith('net.au')) && details.url.includes('https://media.apnarm.net.au/'));
let au_swm_site = (header_referer && urlHost(header_referer).endsWith('com.au') && details.url.includes('https://s.thewest.com.au/'));
let es_grupo_vocento_site = (matchUrlDomain('cdn.ampproject.org', details.url) && matchUrlDomain(es_grupo_vocento_domains, header_referer) && isSiteEnabled({url: header_referer}));
let fr_lacroix_amp_site = (matchUrlDomain('cdn.ampproject.org', details.url) && matchUrlDomain('la-croix.com', header_referer) && isSiteEnabled({url: header_referer}));
let sz_amp_site = (matchUrlDomain('cdn.ampproject.org', details.url) && matchUrlDomain('sueddeutsche.de', header_referer) && isSiteEnabled({url: header_referer}));
if (!isSiteEnabled(details) && !inkl_site && !bloomberg_site && !au_nc_amp_site && !au_apn_site && !au_swm_site && !es_grupo_vocento_site && !sz_amp_site) {
if (!isSiteEnabled(details) && !inkl_site && !bloomberg_site && !au_nc_amp_site && !au_apn_site && !au_swm_site && !es_grupo_vocento_site && !fr_lacroix_amp_site && !sz_amp_site) {
return;
}

View File

@ -4,6 +4,7 @@ Changelog Bypass Paywalls Clean - Chrome
Post-release
Add El Periodico (Spain)
Add Grupo Vocento (Spain, regional daily)
Add La Croix (France)
Add The Hindu BusinessLine (India)
Fix-update Corriere Della Sera (redirect preview)
Fix-update Faz.net (error in json)

View File

@ -1704,6 +1704,17 @@ else if (matchDomain("elperiodico.com")) {
}
}
else if (matchDomain('la-croix.com')) {
let url = window.location.href;
if (!url.includes('la-croix.com/amp/')) {
let paywall_host_param = document.querySelector('#paywall-host-param');
removeDOMElement(paywall_host_param);
} else {
let paywall_block = document.querySelector('#paywall_block');
removeDOMElement(paywall_block);
}
}
// General Functions
function removeDOMElement(...elements) {
for (let element of elements) {

View File

@ -163,6 +163,7 @@
"*://*.journalnow.com/*",
"*://*.knack.be/*",
"*://*.kurier.at/*",
"*://*.la-croix.com/*",
"*://*.labusinessjournal.com/*",
"*://*.ladepeche.fr/*",
"*://*.lanacion.com.ar/*",
@ -344,5 +345,5 @@
"*://*.repstatic.it/*",
"*://*.userzoom.com/*"
],
"version": "1.9.6.6"
"version": "1.9.6.7"
}

View File

@ -93,6 +93,7 @@ var defaultSites =
"L'Écho": "lecho.be",
"L'Opinion": "lopinion.fr",
"L'Orient-Le Jour": "lorientlejour.com",
"La Croix": "la-croix.com",
"La Dépêche": "ladepeche.fr",
"La Estrella de Valparaíso": "estrellavalpo.cl",
"La Nación": "lanacion.com.ar",