From 50c085dddd70b7abe3c11c15a2cade12f5cf7c1c Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sun, 29 Nov 2020 12:07:42 +0100 Subject: [PATCH] =?UTF-8?q?Add=20El=20Comercio,=20Ideal=20&=20La=20Voz=20d?= =?UTF-8?q?e=20C=C3=A1diz=20(Spain)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 +++ background.js | 8 ++++---- changelog.txt | 1 + contentScript.js | 10 ++++++++-- manifest.json | 5 ++++- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0cc5975..fd42be5 100755 --- a/README.md +++ b/README.md @@ -289,12 +289,15 @@ Alma Talent sites (grouped in options) like ##### Spain [ABC](https://www.abc.es) and regional sites from Grupo Vocento (grouped in options) like [Diario Vasco](https://www.diariovasco.com) - +[El Comercio](https://www.elcomercio.es) - [El Correo](https://www.elcorreo.com) - [El Diario Montañés](https://www.eldiariomontanes.es) - [El Norte de Castilla](https://www.elnortedecastilla.es) - [Hoy](https://www.hoy.es) - +[Ideal](https://www.ideal.es) - [La Rioja](https://www.larioja.com) - [La Verdad](https://www.laverdad.es) - +[La Voz de Cádiz](https://www.lavozdigital.es) - [Sur](https://www.diariosur.es) [El Mundo](https://www.elmundo.es) - [El País](https://elpais.com) - diff --git a/background.js b/background.js index f6a0949..d8a1e6b 100755 --- a/background.js +++ b/background.js @@ -284,7 +284,7 @@ const ad_region_domains = ['bd.nl', 'ed.nl', 'tubantia.nl', 'bndestem.nl', 'pzc. const au_comm_media_domains = ['bendigoadvertiser.com.au', 'bordermail.com.au', 'canberratimes.com.au', 'centralwesterndaily.com.au', 'dailyadvertiser.com.au', 'dailyliberal.com.au', 'examiner.com.au', 'illawarramercury.com.au', 'newcastleherald.com.au', 'northerndailyleader.com.au', 'portnews.com.au', 'standard.net.au', 'theadvocate.com.au', 'thecourier.com.au', 'westernadvocate.com.au']; const au_news_corp_domains = ['adelaidenow.com.au', 'cairnspost.com.au', 'couriermail.com.au', 'dailytelegraph.com.au', 'geelongadvertiser.com.au', 'goldcoastbulletin.com.au', 'heraldsun.com.au', 'ntnews.com.au', 'theaustralian.com.au', 'themercury.com.au', 'townsvillebulletin.com.au', 'weeklytimesnow.com.au']; const au_prov_news_domains = ['news-mail.com.au', 'frasercoastchronicle.com.au', 'gladstoneobserver.com.au', 'dailyexaminer.com.au', 'dailymercury.com.au', 'themorningbulletin.com.au', 'sunshinecoastdaily.com.au', 'gympietimes.com.au', 'northernstar.com.au', 'qt.com.au', 'thechronicle.com.au', 'warwickdailynews.com.au']; -const es_grupo_vocento_domains = ['diariosur.es', 'diariovasco.com', 'elcorreo.com', 'eldiariomontanes.es', 'elnortedecastilla.es', 'hoy.es', 'larioja.com', 'laverdad.es']; +const es_grupo_vocento_domains = ['diariosur.es', 'diariovasco.com', 'elcomercio.es', 'elcorreo.com', 'eldiariomontanes.es', 'elnortedecastilla.es', 'hoy.es', 'ideal.es', 'larioja.com', 'laverdad.es', 'lavozdigital.es']; const fi_alma_talent_domains = ['arvopaperi.fi', 'kauppalehti.fi', 'marmai.fi', 'mediuutiset.fi', 'mikrobitti.fi', 'talouselama.fi', 'tekniikkatalous.fi', 'tivi.fi', 'uusisuomi.fi']; const ilmessaggero_domains = ['corriereadriatico.it', 'ilgazzettino.it', 'ilmattino.it', 'quotidianodipuglia.it']; const nymag_domains = ['grubstreet.com', 'thecut.com', 'vulture.com']; @@ -355,7 +355,7 @@ function add_grouped_sites(init_rules) { } for (let domain of es_grupo_vocento_domains) { allow_cookies.push(domain); - blockedRegexes[domain] = /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/; + blockedRegexes[domain] = /cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js/; } for (let domain of fi_alma_talent_domains) { use_google_bot.push(domain); @@ -466,8 +466,8 @@ ext_api.storage.onChanged.addListener(function (changes, namespace) { ext_api.webRequest.handlerBehaviorChanged(); } if (key === 'sites_custom') { - var sites_custom = storageChange.newValue; - var sites_custom_old = storageChange.oldValue; + var sites_custom = storageChange.newValue ? storageChange.newValue : {}; + var sites_custom_old = storageChange.oldValue ? storageChange.oldValue : {}; customSites = sites_custom; customSites_domains = Object.values(sites_custom).map(x => x.domain); diff --git a/changelog.txt b/changelog.txt index 1fa2b09..29f062b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Chrome Post-release +Add El Comercio, Ideal & La Voz de Cadiz (Spain) Fix-update El Mercurio & La Segunda (mobile) * v1.9.7.0 (2020-11-27) diff --git a/contentScript.js b/contentScript.js index 4cab450..6d3f1f9 100755 --- a/contentScript.js +++ b/contentScript.js @@ -4,7 +4,7 @@ var domain; // clean local storage of sites (with an exemption for hold-list) var arr_localstorage_hold = ['elmundo.es', 'kurier.at', 'nknews.org', 'nrz.de', 'seekingalpha.com', 'sfchronicle.com', 'thehindu.com', 'thetimes.co.uk', 'waz.de', 'wp.de', 'wr.de']; -var es_grupo_vocento_domains = ['diariosur.es', 'diariovasco.com', 'elcorreo.com', 'eldiariomontanes.es', 'elnortedecastilla.es', 'hoy.es', 'larioja.com', 'laverdad.es']; +var es_grupo_vocento_domains = ['diariosur.es', 'diariovasco.com', 'elcomercio.es', 'elcorreo.com', 'eldiariomontanes.es', 'elnortedecastilla.es', 'hoy.es', 'ideal.es', 'larioja.com', 'laverdad.es', 'lavozdigital.es']; arr_localstorage_hold = arr_localstorage_hold.concat(es_grupo_vocento_domains); if (!matchDomain(arr_localstorage_hold)){ window.localStorage.clear(); @@ -1654,7 +1654,7 @@ else if (matchDomain("latercera.com")) { else if (matchDomain(es_grupo_vocento_domains)) { let url = window.location.href; - let content_exclusive_bg = document.querySelector('.content-exclusive-bg '); + let content_exclusive_bg = document.querySelector('.content-exclusive-bg, #cierre_suscripcion'); let amphtml = document.querySelector('link[rel="amphtml"]'); if (content_exclusive_bg && amphtml) { window.setTimeout(function () { @@ -1671,6 +1671,12 @@ else if (matchDomain(es_grupo_vocento_domains)) { if (subscr_section) subscr_section.removeAttribute('amp-access-hide'); } + //lavozdigital.es + let paywall = document.querySelector('span[subscriptions-section="content"]'); + if (paywall) { + paywall.classList.remove('paywall'); + paywall.removeAttribute('subscriptions-section'); + } } } diff --git a/manifest.json b/manifest.json index 45aba0d..30d3cec 100644 --- a/manifest.json +++ b/manifest.json @@ -95,6 +95,7 @@ "*://*.economist.com/*", "*://*.ed.nl/*", "*://*.editorialedomani.it/*", + "*://*.elcomercio.es/*", "*://*.elcomercio.pe/*", "*://*.elcorreo.com/*", "*://*.eldiariomontanes.es/*", @@ -146,6 +147,7 @@ "*://*.hoy.es/*", "*://*.hs.fi/*", "*://*.humo.be/*", + "*://*.ideal.es/*", "*://*.ilfattoquotidiano.it/*", "*://*.ilgazzettino.it/*", "*://*.illawarramercury.com.au/*", @@ -175,6 +177,7 @@ "*://*.latercera.com/*", "*://*.latimes.com/*", "*://*.laverdad.es/*", + "*://*.lavozdigital.es/*", "*://*.lc.nl/*", "*://*.lecho.be/*", "*://*.ledevoir.com/*", @@ -354,5 +357,5 @@ "*://*.repstatic.it/*", "*://*.userzoom.com/*" ], - "version": "1.9.7.1" + "version": "1.9.7.2" } \ No newline at end of file