diff --git a/README.md b/README.md index 688e22b..1cf95aa 100644 --- a/README.md +++ b/README.md @@ -159,6 +159,7 @@ Visit the [Chrome repository](https://gitlab.com/magnolia1234/bypass-paywalls-ch [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) - diff --git a/background.js b/background.js index c107476..2733b75 100644 --- a/background.js +++ b/background.js @@ -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; } diff --git a/changelog.txt b/changelog.txt index 7becdb9..90d56b9 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,7 @@ Changelog Bypass Paywalls Clean - Firefox 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) diff --git a/contentScript.js b/contentScript.js index 37189d6..8bab49e 100644 --- a/contentScript.js +++ b/contentScript.js @@ -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) { diff --git a/manifest.json b/manifest.json index d0558ba..d019b9d 100644 --- a/manifest.json +++ b/manifest.json @@ -176,6 +176,7 @@ "*://*.journalnow.com/*", "*://*.knack.be/*", "*://*.kurier.at/*", + "*://*.la-croix.com/*", "*://*.labusinessjournal.com/*", "*://*.ladepeche.fr/*", "*://*.lanacion.com.ar/*", @@ -357,5 +358,5 @@ "*://*.repstatic.it/*", "*://*.userzoom.com/*" ], - "version": "1.9.6.6" + "version": "1.9.6.7" } \ No newline at end of file diff --git a/sites.js b/sites.js index 4029ede..747ee27 100644 --- a/sites.js +++ b/sites.js @@ -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",