From a0651dbb756e9ebfeb1fd5f2816be9cb08109a69 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Wed, 3 Aug 2022 19:30:06 +0200 Subject: [PATCH] Grouping Unidad Editorial --- README.md | 23 ++++++++++++----------- changelog.txt | 1 + contentScript.js | 2 +- sites.js | 27 ++++++++++----------------- 4 files changed, 24 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 604b6e9..6eea7a2 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ Grouped in options:\ [The Wrap](https://www.thewrap.com) Grouped in options:\ -*Condé Nast magazines* sites like:\ +*Condé Nast magazines* sites like\ [Architectural Digest](https://www.architecturaldigest.com) - [Bon Appétit](https://www.bonappetit.com) - [GC](https://www.gq.com) - @@ -192,7 +192,7 @@ Grouped in options:\ [Vanity Fair](https://www.vanityfair.com) - [Vogue USA](https://www.vogue.com) - [Wired](https://www.wired.com)\ -*Hearst Communications magazines* sites like:\ +*Hearst Communications magazines* sites like\ [Bicycling](https://www.bicycling.com) - [Cosmopolitan](https://www.cosmopolitan.com) - [Country Living](https://www.countryliving.com) - @@ -208,7 +208,7 @@ Grouped in options:\ [The Hollywood Reporter](https://www.hollywoodreporter.com) - [Town & Country](https://www.townandcountrymag.com) - [Women's Health](https://www.womenshealthmag.com)\ -*Outside magazines* sites like:\ +*Outside magazines* sites like\ [Backpacker](https://www.backpacker.com) - [Beta](https://www.betamtb.com) - [Better Nutrition](https://www.betternutrition.com) - @@ -228,7 +228,7 @@ Grouped in options:\ [Velo News](https://www.velonews.com) - [Women's Running](https://www.womensrunning.com) - [Yoga Journal](https://www.yogajournal.com)\ -*Penske Media Corporation* sites like:\ +*Penske Media Corporation* sites like\ [Billboard](https://www.billboard.com) - [Rolling Stone](https://www.rollingstone.com) - [Sportico](https://www.sportico.com) - @@ -257,7 +257,7 @@ Grouped in options:\ [USA Today](https://www.usatoday.com)\ Grouped in options:\ -*Advance Local* sites like:\ +*Advance Local* sites like\ [AL/Alabama](https://www.al.com) - [MLive/Michigan](https://www.mlive.com) - [NJ/New Jersey](https://www.nj.com) - @@ -581,7 +581,7 @@ Grouped in options:\ [Vrij Nederland](https://www.vn.nl) Grouped in options:\ -*Mediahuis België* sites like:\ +*Mediahuis België* sites like\ [De Standaard](https://www.standaard.be) - [Gazet van Antwerpen](https://www.gva.be) - [Het Belang van Limburg](https://www.hbvl.be) - @@ -608,16 +608,13 @@ Grouped in options:\ [El Confidencial](https://www.elconfidencial.com) - [El Diario.es](https://www.eldiario.es) - [El Español](https://www.elespanol.com) - -[El Mundo](https://www.elmundo.es) - [El País](https://elpais.com) - [El Periódico de Catalunya](https://www.elperiodico.com) - -[Expansión](https://www.expansion.com) - [La Vanguardia](https://www.lavanguardia.com) - -[Marca](https://www.marca.com) - [Política Exterior](https://www.politicaexterior.com) Grouped in options:\ -*ARA* sites like:\ +*ARA* sites like\ [Ara.cat](https://www.ara.cat) - [Ara Balears](https://www.arabalears.cat)\ *Grupo Prensa Ibérica* sites like (opt-in to custom sites for unlisted):\ @@ -630,6 +627,10 @@ Grouped in options:\ [La Provincia](https://www.laprovincia.es) - [Levante-EMV](https://www.levante-emv.com) - [Mallorca Zeitung](https://www.mallorcazeitung.es)\ +*Grupo Unidad Editorial* sites like\ +[El Mundo](https://www.elmundo.es) - +[Expansión](https://www.expansion.com) - +[Marca](https://www.marca.com)\ *Grupo Vocento* (ABC regional) sites like\ [Diario Vasco](https://www.diariovasco.com) - [El Comercio](https://www.elcomercio.es) - @@ -773,7 +774,7 @@ Grouped in options:\ ##### Mexico [Mexico News Daily](https://mexiconewsdaily.com) ##### Peru -*Grupo El Comercio* sites like: +*Grupo El Comercio* sites like [Diario Correo](https://diariocorreo.pe) - [El Comercio](https://elcomercio.pe) - [Gestión](https://gestion.pe) diff --git a/changelog.txt b/changelog.txt index e077946..95fdfe2 100644 --- a/changelog.txt +++ b/changelog.txt @@ -7,6 +7,7 @@ Add Standaard.be Add SuomenSotilas.fi Add Tagesspiegel.de Fix The Athletic (amp) +Grouping Unidad Editorial Grouping Westfaelische Mediengruppe Redirect Google AMP cache (opt-in to custom sites) Update block general paywall script (limit Evolok WordPress) diff --git a/contentScript.js b/contentScript.js index 0d52b6e..52abeb4 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1144,7 +1144,7 @@ else if (matchDomain('elespanol.com')) { else if (matchDomain(es_unidad_domains)) { let premium = document.querySelector('.ue-c-article__premium'); let url = window.location.href; - if (!window.location.hostname.startsWith('amp.')) { + if (!window.location.hostname.match(/^amp(-\w{2})?\./)) { if (premium) { removeDOMElement(premium); window.location.href = url.replace('/www.', '/amp.'); diff --git a/sites.js b/sites.js index df82ddc..1900267 100644 --- a/sites.js +++ b/sites.js @@ -406,10 +406,6 @@ var defaultSites = { block_regex: /\.(elmercurio\.com|emol\.cl)\/(.+\/)?js\/(.+\/)?(modal|merPramV\d|PramModal\.min)\.js/, useragent: "googlebot" }, - "El Mundo": { - domain: "elmundo.es", - group_rule: "###_gr_es_unidad_domains" - }, "El País": { domain: "elpais.com", allow_cookies: 1, @@ -470,10 +466,6 @@ var defaultSites = { domain: "exame.com", block_regex: /\/exame\.com\/.+\/js\/pywll-dyn\.js/ }, - "Expansión": { - domain: "expansion.com", - group_rule: "###_gr_es_unidad_domains" - }, "Finance.si": { domain: "finance.si", allow_cookies: 1, @@ -723,6 +715,15 @@ var defaultSites = { allow_cookies: 1, block_regex: /(\.piano\.io\/|cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ }, + "Grupo Unidad Editorial": { + domain: "###_es_unidad", + group: [ + "elmundo.es", + "expansion.com", + "marca.com"], + allow_cookies: 1, + block_regex: /cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js/ + }, "Grupo Vocento": { domain: "###_es_grupo_vocento", group: [ @@ -1139,10 +1140,6 @@ var defaultSites = { allow_cookies: 1, useragent: "googlebot" }, - "Marca": { - domain: "marca.com", - group_rule: "###_gr_es_unidad_domains" - }, "Marianne.net": { domain: "marianne.net", allow_cookies: 1, @@ -2029,11 +2026,6 @@ var defaultSites = { group_rule_domains: ["brisbanetimes.com.au", "smh.com.au", "theage.com.au", "watoday.com.au"], block_regex: /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/ }, - "###_gr_es_unidad_domains": { - group_rule_domains: ["elmundo.es", "expansion.com", "marca.com"], - allow_cookies: 1, - block_regex: /cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js/ - }, "###_gr_it_repubblica_domains": { group_rule_domains: ["gelocal.it", "huffingtonpost.it", "ilsecoloxix.it", "italian.tech", "lastampa.it", "lescienze.it", "limesonline.com", "repubblica.it"], allow_cookies: 1, @@ -2195,6 +2187,7 @@ var au_comm_media_domains = grouped_sites['###_au_comm_media']; var au_news_corp_domains = grouped_sites['###_au_news_corp']; var be_mediahuis_domains = grouped_sites['###_be_mediahuis']; var ca_gcm_domains = grouped_sites['###_ca_gcm']; +var de_westfalen_medien_domains = grouped_sites['###_de_westfalen_medien']; var fr_groupe_sud_ouest_domains = grouped_sites['###_fr_groupe_sud_ouest']; var it_repubblica_domains = defaultSites['###_gr_it_repubblica_domains']['group_rule_domains']; var medium_custom_domains = grouped_sites['###_medium_custom'];