From b36a3c2bea1fbbca0342acad15cf0e0e7eccc25b Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Tue, 1 Mar 2022 18:50:33 +0100 Subject: [PATCH] Add La Opinion de Malaga --- README.md | 1 + changelog.txt | 1 + contentScript.js | 14 +++++++++++--- manifest.json | 3 ++- sites.js | 2 +- sites_updated.json | 15 +++++++++++++++ 6 files changed, 31 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e786084c..89b3ffe8 100644 --- a/README.md +++ b/README.md @@ -549,6 +549,7 @@ Grouped in options:\ [Faro de Vigo](https://www.farodevigo.es) - [Información](https://www.informacion.es) - [La Nueva España](https://www.lne.es) - +[La Opinión de Málaga](https://www.laopiniondemalaga.es) - [La Opinión de Murcia](https://www.laopiniondemurcia.es) - [La Provincia](https://www.laprovincia.es) - [Levante-EMV](https://www.levante-emv.com)\ diff --git a/changelog.txt b/changelog.txt index fbf2e101..1789408e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Add La Opinion de Malaga Fix Iltalehti.fi (Youtube video/image no source) * v2.5.8.0 (2022-02-27) diff --git a/contentScript.js b/contentScript.js index 6bac66eb..71688196 100644 --- a/contentScript.js +++ b/contentScript.js @@ -8,7 +8,7 @@ var dompurify_loaded = (typeof DOMPurify === 'function'); var ca_torstar_domains = ['niagarafallsreview.ca', 'stcatharinesstandard.ca', 'thepeterboroughexaminer.com', 'therecord.com', 'thespec.com', 'thestar.com', 'wellandtribune.ca']; var de_funke_media_domains = ['abendblatt.de', 'braunschweiger-zeitung.de', 'morgenpost.de', 'nrz.de', 'otz.de', 'thueringer-allgemeine.de', 'tlz.de', 'waz.de', 'wp.de', 'wr.de']; var de_madsack_domains = ['haz.de', 'kn-online.de', 'ln-online.de', 'lvz.de', 'maz-online.de', 'neuepresse.de', 'ostsee-zeitung.de']; -var es_epiberica_domains = ['diariodeibiza.es', 'diariodemallorca.es', 'eldia.es', 'elperiodicomediterraneo.com', 'farodevigo.es', 'informacion.es', 'laopiniondemurcia.es', 'laprovincia.es', 'levante-emv.com', 'lne.es']; +var es_epiberica_domains = ['diariodeibiza.es', 'diariodemallorca.es', 'eldia.es', 'elperiodicomediterraneo.com', 'farodevigo.es', 'informacion.es', 'laopiniondemalaga.es', 'laopiniondemurcia.es', 'laprovincia.es', 'levante-emv.com', 'lne.es']; var es_grupo_vocento_domains = ['diariosur.es', 'diariovasco.com', 'elcomercio.es', 'elcorreo.com', 'eldiariomontanes.es', 'elnortedecastilla.es', 'hoy.es', 'ideal.es', 'larioja.com', 'lasprovincias.es', 'laverdad.es', 'lavozdigital.es']; var es_unidad_domains = ['elmundo.es', 'expansion.com', 'marca.com']; var fi_alma_talent_domains = ['arvopaperi.fi', 'iltalehti.fi', 'kauppalehti.fi', 'marmai.fi', 'mediuutiset.fi', 'mikrobitti.fi', 'talouselama.fi', 'tekniikkatalous.fi', 'tivi.fi', 'uusisuomi.fi']; @@ -661,10 +661,15 @@ else if (matchDomain(['westfalen-blatt.de', 'wn.de'])) { if (url.includes('/amp/')) { amp_unhide_subscr_section('amp-ad, amp-embed, section[class^="fp-ad"]'); } else { - let paywall = document.querySelector('.fp-article-paywall'); + let paywall = document.querySelector('.fp-article-paywall-dialog, .fp-article-paywall'); if (paywall) { removeDOMElement(paywall); - if (!url.includes('/fotos/')) + let gallery_no_amp = false; + if (matchDomain('westfalen-blatt.de')) { + let article_body = document.querySelector('.fp-article__body'); + gallery_no_amp = url.includes('/fotos/') || (!article_body && document.querySelector('.fp-gallery-carousel')); + } + if (!gallery_no_amp) window.location.href = url.replace('.de/', '.de/amp/'); } } @@ -1081,6 +1086,9 @@ else if (matchDomain(es_epiberica_domains)) { if (window.location.href.includes('.amp.html')) { amp_unhide_access_hide('="NOT access"', '="access"'); amp_unhide_access_hide('="FALSE"'); + } else { + let ads = document.querySelectorAll('div.commercial-up-full__wrapper, div.article-sidebar--sticky'); + removeDOMElement(...ads); } } diff --git a/manifest.json b/manifest.json index 34c3ac08..4aa0d11f 100644 --- a/manifest.json +++ b/manifest.json @@ -299,6 +299,7 @@ "*://*.lanazione.it/*", "*://*.lanouvellerepublique.fr/*", "*://*.lanuovasardegna.it/*", + "*://*.laopiniondemalaga.es/*", "*://*.laopiniondemurcia.es/*", "*://*.laprovincia.es/*", "*://*.lardennais.fr/*", @@ -627,5 +628,5 @@ "*://*.wallkit.net/*", "*://*.wsj.net/*" ], - "version": "2.5.8.1" + "version": "2.5.8.2" } diff --git a/sites.js b/sites.js index 7346d928..c46941c4 100644 --- a/sites.js +++ b/sites.js @@ -429,7 +429,6 @@ var defaultSites = { }, "Financial Times (not Chinese)": { domain: "ft.com", - allow_cookies: 1, block_regex: /cdn\.ampproject\.org\/v\d\/amp-(access|ad|subscriptions)-.+\.js/, useragent: "googlebot" }, @@ -636,6 +635,7 @@ var defaultSites = { "elperiodicomediterraneo.com", "farodevigo.es", "informacion.es", + "laopiniondemalaga.es", "laopiniondemurcia.es", "laprovincia.es", "levante-emv.com", diff --git a/sites_updated.json b/sites_updated.json index 72f90d67..247464d9 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -1,4 +1,19 @@ { + "Financial Times (not Chinese)": { + "domain": "ft.com", + "block_regex": "cdn\\.ampproject\\.org\\/v\\d\\/amp-(access|ad|subscriptions)-.+\\.js", + "useragent": "googlebot" + }, + "La Opinión de Málaga": { + "domain": "laopiniondemalaga.es", + "allow_cookies": 1, + "block_regex": "(\\.piano\\.io\\/|cdn\\.cxense\\.com\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-(access|analytics)-.+\\.js)" + }, + "La Opinión de Murcia": { + "domain": "laopiniondemurcia.es", + "allow_cookies": 1, + "block_regex": "(\\.piano\\.io\\/|cdn\\.cxense\\.com\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-(access|analytics)-.+\\.js)" + }, "Neue Osnabrücker Zeitung": { "domain": "noz.de", "allow_cookies": 1,