diff --git a/README.md b/README.md index 52a5803e..093193e3 100644 --- a/README.md +++ b/README.md @@ -308,7 +308,8 @@ Grouped in options:\ [ABC](https://www.abc.es) - [El Mundo](https://www.elmundo.es) - [El País](https://elpais.com) - -[El Periódico](https://www.elperiodico.com)\ +[El Periódico](https://www.elperiodico.com) - +[Expansión}(https://www.expansion.com)\ Grouped in options:\ Grupo Vocento (ABC) regional sites like [Diario Vasco](https://www.diariovasco.com) - diff --git a/background.js b/background.js index 82356077..22ce9371 100644 --- a/background.js +++ b/background.js @@ -50,6 +50,7 @@ var allow_cookies_default = [ 'esprit.presse.fr', 'euobserver.com', 'eurekareport.com.au', + 'expansion.com', 'faz.net', 'financialpost.com', 'folha.uol.com.br', @@ -206,12 +207,13 @@ var blockedRegexes = { 'editorialedomani.it': /(.+\.editorialedomani\.it\/pelcro\.js|js\.pelcro\.com\/.+)/, 'elcomercio.pe': /elcomercio\.pe\/pf\/dist\/template\/elcomercio-noticia.+\.js/, 'elmercurio.com': /\.(elmercurio\.com|emol\.cl)\/(.+\/)?js\/(.+\/)?(modal|merPramV\d|PramModal\.min)\.js/, - 'elmundo.es': /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/, + 'elmundo.es': /cdn\.ampproject\.org\/v\d\/amp-(access|consent)-.+\.js/, 'elpais.com': /\.cdn\.arcpublishing\.com\/arc\/subs\/p\.min\.js/, 'elperiodico.com': /cdn\.ampproject\.org\/v\d\/amp-(access|consent)-.+\.js/, 'estadao.com.br': /acesso\.estadao\.com\.br\/paywall\/.+\/pw\.js/, 'estrellavalpo.cl': /(.+\.mercuriovalpo\.cl\/impresa\/.+\/assets\/(vendor|\d)\.js|pram\.pasedigital\.cl\/API\/User\/Status\?)/, 'exame.abril.com.br': /cdn\.tinypass\.com\/.+/, + 'expansion.com': /cdn\.ampproject\.org\/v\d\/amp-(access|consent)-.+\.js/, 'financialpost.com': /cdn\.tinypass\.com\/.+/, 'folha.uol.com.br': /(.+\.folha\.uol\.com\.br\/paywall\/js\/.+\/publicidade\.ads\.js|paywall\.folha\.uol\.com\.br\/.+|js\.matheranalytics\.com\/.+)/, 'foreignaffairs.com': /.+\.foreignaffairs\.com\/sites\/default\/files\/js\/js_[^y].+\.js/, diff --git a/changelog.txt b/changelog.txt index f31b3654..a99c1594 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Add Expansion (Spain) Add FreiePresse.de Add L'Obs (France) Add Paris Match (France) diff --git a/contentScript.js b/contentScript.js index 05e03e8a..dd84e26f 100644 --- a/contentScript.js +++ b/contentScript.js @@ -10,7 +10,7 @@ var fr_groupe_ebra_domains = ['bienpublic.com', 'dna.fr', 'estrepublicain.fr', ' var fr_groupe_la_depeche_domains = ['centrepresseaveyron.fr', 'ladepeche.fr', 'lindependant.fr', 'midi-olympique.fr', 'midilibre.fr', 'nrpyrenees.fr', 'petitbleu.fr']; // clean local storage of sites (with an exemption for hold-list) -var arr_localstorage_hold = ['charliehebdo.fr', 'elmundo.es', 'kurier.at', 'nknews.org', 'seekingalpha.com', 'sfchronicle.com', 'thehindu.com', 'thetimes.co.uk']; +var arr_localstorage_hold = ['charliehebdo.fr', 'elmundo.es', 'expansion.com', 'kurier.at', 'nknews.org', 'seekingalpha.com', 'sfchronicle.com', 'thehindu.com', 'thetimes.co.uk']; arr_localstorage_hold = arr_localstorage_hold.concat(de_funke_media_domains, es_grupo_vocento_domains); if (!matchDomain(arr_localstorage_hold)){ window.localStorage.clear(); @@ -969,14 +969,13 @@ else if (matchDomain(['lejdd.fr', 'parismatch.com'])) { } } -else if (matchDomain('elmundo.es')) { +else if (domain = matchDomain(['elmundo.es', 'expansion.com'])) { let premium = document.querySelector('.ue-c-article__premium'); - window.setTimeout(function () { - if (premium && window.location.href.includes('/www.elmundo.es/')) { + if (premium && window.location.href.includes('/www.' + domain + '/')) { + window.setTimeout(function () { window.location.href = window.location.href.replace('/www.', '/amp.'); - } - }, 500); // Delay (in milliseconds) - if (window.location.href.includes('/amp.elmundo.es/')) { + }, 500); // Delay (in milliseconds) + } else if (window.location.href.includes('/amp.' + domain + '/')) { let paywall = document.querySelector('div[amp-access="authorized!=true"]'); if (paywall) { removeDOMElement(paywall); @@ -985,6 +984,8 @@ else if (matchDomain('elmundo.es')) { div_hidden.removeAttribute('amp-access-hide'); } } + let adverts = document.querySelectorAll('.advertising, amp-embed'); + removeDOMElement(...adverts); } } diff --git a/manifest.json b/manifest.json index 25edb210..8787fe68 100644 --- a/manifest.json +++ b/manifest.json @@ -132,6 +132,7 @@ "*://*.eurekareport.com.au/*", "*://*.exame.abril.com.br/*", "*://*.examiner.com.au/*", + "*://*.expansion.com/*", "*://*.faz.net/*", "*://*.fd.nl/*", "*://*.financialpost.com/*", @@ -413,5 +414,5 @@ "*://*.repstatic.it/*", "*://*.userzoom.com/*" ], - "version": "2.0.0.3" + "version": "2.0.0.4" } \ No newline at end of file diff --git a/sites.js b/sites.js index b9043826..c6fcfe70 100644 --- a/sites.js +++ b/sites.js @@ -55,6 +55,7 @@ var defaultSites = "EUobserver": "euobserver.com", "Eureka Report": "eurekareport.com.au", "Exame": "exame.abril.com.br", + "Expansión": "expansion.com", "Financial News": "fnlondon.com", "Financial Post": "financialpost.com", "Financial Times": "ft.com",