diff --git a/README.md b/README.md index 0196976d..f5cbe0b3 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,8 @@ BPC add-on works fine in [Firefox Nightly](https://play.google.com/store/apps/de For Firefox Nightly or Fennec F-Droid (based on latest Firefox for Android) you have to make your own custom add-on collection (or use another that contains BPC). \ [Iceraven (Fenix fork)](https://github.com/fork-maintainers/iceraven-browser) uses: [What I want on Fenix](https://addons.mozilla.org/en-US/firefox/collections/16201230/What-I-want-on-Fenix)\ It has a custom add-ons account: 16201230 & collection: What-I-want-on-Fenix.\ -In IceRaven all add-ons are shown (with search option), but In Firefox Nightly and Fennec F-Droid only the first 50 add-ons are shown (including this add-on). +In IceRaven all add-ons are shown (with search option), but In Firefox Nightly and Fennec F-Droid only the first 50 add-ons are shown (including this add-on).\ +PS enabling custom sites (optional permissions) isn't working on Android (Firefox Nightly, Fennec F-Droid or IceRaven). #### Chrome/Chromium Visit the [Chrome repository](https://gitlab.com/magnolia1234/bypass-paywalls-chrome-clean) of Bypass Paywall Clean. @@ -332,10 +333,12 @@ Grouped in options:\ ##### Spain [ABC](https://www.abc.es) - +[El Diario.es](https://www.eldiario.es) - [El Mundo](https://www.elmundo.es) - [El País](https://elpais.com) - -[El Periódico](https://www.elperiodico.com) - +[El Periódico de Catalunya](https://www.elperiodico.com) - [Expansión](https://www.expansion.com) - +[La Nueva España](https://www.lne.es) - [La Vanguardia](https://www.lavanguardia.com)\ Grouped in options:\ Grupo Vocento (ABC) regional sites like diff --git a/background.js b/background.js index 80591a65..c9ccc795 100644 --- a/background.js +++ b/background.js @@ -4,7 +4,7 @@ var ext_api = (typeof browser === 'object') ? browser : chrome; var ext_name = ext_api.runtime.getManifest().name; -const cs_limit_except = ['afr.com', 'discovermagazine.com', 'elcomercio.pe', 'elpais.com', 'faz.net', 'gestion.pe', 'harpers.org', 'inkl.com', 'la-croix.com', 'lescienze.it', 'newleftreview.org', 'prospectmagazine.co.uk', 'techinasia.com', 'thepointmag.com']; +const cs_limit_except = ['afr.com', 'discovermagazine.com', 'elcomercio.pe', 'elpais.com', 'faz.net', 'gestion.pe', 'harpers.org', 'inkl.com', 'la-croix.com', 'lescienze.it', 'lne.es', 'newleftreview.org', 'prospectmagazine.co.uk', 'techinasia.com', 'thepointmag.com']; var currentTabUrl = ''; var csDone = false; @@ -78,6 +78,7 @@ var allow_cookies_default = [ 'lejdd.fr', 'lesechos.fr', 'limesonline.com', + 'lne.es', 'lrb.co.uk', 'modernhealthcare.com', 'nationalgeographic.com', @@ -265,6 +266,7 @@ var blockedRegexes = { 'lesechos.fr': /\.tinypass\.com\/.+/, 'limesonline.com': /scripts\.repubblica\.it\/pw\/pw\.js.+/, 'livemint.com': /(.+\.livemint\.com\/js\/localWorker\.js|analytics\.htmedia\.in\/analytics-js\/.+\.js)/, + 'lne.es': /cdn\.ampproject\.org\/v\d\/amp-(access|consent)-.+\.js/, 'lopinion.fr': /.+\.poool\.fr\/.+/, 'lrb.co.uk': /\.tinypass\.com\/.+/, 'marketwatch.com': /cdn\.cxense\.com\/.+/, @@ -826,7 +828,7 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) { let usa_discmag_site = (matchUrlDomain('ctfassets.net', details.url) && matchUrlDomain('discovermagazine.com', header_referer) && isSiteEnabled({url: header_referer})); let bpc_amp_site = (matchUrlDomain('cdn.ampproject.org', details.url) && isSiteEnabled({url: header_referer}) && - matchUrlDomain(['barrons.com', 'belfasttelegraph.co.uk', 'cicero.de', 'cmjornal.pt', 'elmundo.es', 'elpais.com', 'elperiodico.com', 'expansion.com', 'freiepresse.de', 'fresnobee.com', 'gelocal.it', 'independent.ie', 'irishtimes.com', 'la-croix.com', 'nationalreview.com', 'sacbee.com', 'seekingalpha.com', 'sueddeutsche.de', 'svz.de', 'telegraph.co.uk'].concat(au_nine_domains, es_grupo_vocento_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains), header_referer)); + matchUrlDomain(['barrons.com', 'belfasttelegraph.co.uk', 'cicero.de', 'cmjornal.pt', 'elmundo.es', 'elpais.com', 'elperiodico.com', 'expansion.com', 'freiepresse.de', 'fresnobee.com', 'gelocal.it', 'independent.ie', 'irishtimes.com', 'la-croix.com', 'lne.es', 'nationalreview.com', 'sacbee.com', 'seekingalpha.com', 'sueddeutsche.de', 'svz.de', 'telegraph.co.uk'].concat(au_nine_domains, es_grupo_vocento_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains), header_referer)); if (!isSiteEnabled(details) && !inkl_site && !au_nc_amp_site && !au_apn_site && !au_swm_site && !uk_nlr_site && !usa_discmag_site && !bpc_amp_site) { return; diff --git a/changelog.txt b/changelog.txt index b1232f49..227863e8 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,8 @@ Changelog Bypass Paywalls Clean - Firefox Post-release Add Ambito (Argentina) Add Correio da Manha (Portugal) +Add elDiario.es (Spain) +Add La Nueva Espana (Spain) Add Observador (Portugal) Add Prospect Magazine (United Kingdom) Add Ruhr Nachrichten (Germany) diff --git a/contentScript.js b/contentScript.js index 9a1b5b42..46b16226 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1952,6 +1952,23 @@ else if (matchDomain('thepointmag.com')) { removeDOMElement(elem); } +else if (matchDomain('lne.es')) { + let premium = document.querySelector('body.premium'); + let url = window.location.href; + window.setTimeout(function () { + if (premium && !url.includes('.amp.html')) { + window.location.href = url.replace('.html', '.amp.html'); + } + }, 500); // Delay (in milliseconds) + if (url.includes('.amp.html')) { + let section_hidden = document.querySelector('div[amp-access="access"]'); + if (section_hidden) + section_hidden.removeAttribute('amp-access-hide'); + let not_subscriber = document.querySelector('div[amp-access="NOT access"]'); + removeDOMElement(not_subscriber); + } +} + else if (!matchDomain(['belfasttelegraph.co.uk', 'independent.ie'])) csDone = true; diff --git a/manifest.json b/manifest.json index 15d6a948..73d0e552 100644 --- a/manifest.json +++ b/manifest.json @@ -123,6 +123,7 @@ "*://*.elcomercio.es/*", "*://*.elcomercio.pe/*", "*://*.elcorreo.com/*", + "*://*.eldiario.es/*", "*://*.eldiariomontanes.es/*", "*://*.elmercurio.com/*", "*://*.elmundo.es/*", @@ -234,6 +235,7 @@ "*://*.lindependant.fr/*", "*://*.livemint.com/*", "*://*.ln-online.de/*", + "*://*.lne.es/*", "*://*.loebclassics.com/*", "*://*.lopinion.fr/*", "*://*.lorientlejour.com/*", @@ -438,5 +440,5 @@ "*://*.stripe.com/*", "*://*.userzoom.com/*" ], - "version": "2.0.4.6" + "version": "2.0.4.7" } \ No newline at end of file diff --git a/sites.js b/sites.js index eafb1d08..2745b4de 100644 --- a/sites.js +++ b/sites.js @@ -48,11 +48,12 @@ var defaultSites = "Discover Magazine": "discovermagazine.com", "Domani": "editorialedomani.it", "El Comercio": "elcomercio.pe", + "El Diario.es": "eldiario.es", "El Mercurio": "elmercurio.com", "El Mercurio de Valparaíso": "mercuriovalpo.cl", "El Mundo": "elmundo.es", "El País": "elpais.com", - "El Periódico": "elperiodico.com", + "El Periódico (de Catalunya)": "elperiodico.com", "Encyclopedia Britannica": "britannica.com", "Esprit": "esprit.presse.fr", "EUobserver": "euobserver.com", @@ -110,6 +111,7 @@ var defaultSites = "La Croix": "la-croix.com", "La Estrella de Valparaíso": "estrellavalpo.cl", "La Nación": "lanacion.com.ar", + "La Nueva España": "lne.es", "La Nuova Sardegna": "lanuovasardegna.it", "La Repubblica": "repubblica.it", "La Segunda": "lasegunda.com",