From 7a2e0f351286b5f30be41622531af5516a5c7365 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sat, 13 Aug 2022 07:51:42 +0200 Subject: [PATCH] Fix El Espanol (menu) --- changelog.txt | 1 + contentScript.js | 6 ++++-- manifest.json | 2 +- sites.js | 2 +- sites_updated.json | 10 ++++++++++ 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index 5c47ddd..305b2d8 100644 --- a/changelog.txt +++ b/changelog.txt @@ -8,6 +8,7 @@ Remove Limburger.nl & Standaard.be (fix obsolete) Remove Golem.de, Tagesspiegel.de, Welt.de & Wiwo.de (fix obsolete) Remove World Politics Review (fix obsolete) Fix Australia News Corp (amp-iframe) +Fix El Espanol (menu) Fix Spiegel.de (link to archive.is) Fix The New Republic (js) Fix TheTimes.co.uk (link to archive.is & epaper-fix obsolete) diff --git a/contentScript.js b/contentScript.js index 8aec4af..087a97e 100644 --- a/contentScript.js +++ b/contentScript.js @@ -39,7 +39,7 @@ var usa_outside_mag_domains = ["backpacker.com", "betamtb.com", "betternutrition var usa_tribune_domains = ['baltimoresun.com', 'chicagotribune.com', 'courant.com', 'dailypress.com', 'mcall.com', 'nydailynews.com', 'orlandosentinel.com', 'pilotonline.com', 'sun-sentinel.com']; // clean local storage of sites (with an exemption for hold-list) -var arr_localstorage_hold = ['abc.es', 'allgaeuer-zeitung.de', 'augsburger-allgemeine.de', 'barrons.com', 'businessoffashion.com', 'challenges.fr', 'charliehebdo.fr', 'cmjornal.pt', 'corriere.it', 'corrieredellosport.it', 'eldiario.es', 'elespanol.com', 'elle.fr', 'elpais.com', 'elperiodico.com', 'enotes.com', 'estadao.com.br', 'forbes.com', 'fortune.com', 'economictimes.com', 'freiepresse.de', 'ilfoglio.it', 'inc42.com', 'lanouvellerepublique.fr', 'lesechos.fr', 'mid-day.com', 'nytimes.com', 'nzherald.co.nz', 'scmp.com', 'seekingalpha.com', 'substack.com', 'telegraph.co.uk', 'theatlantic.com', 'thehindu.com', 'thetimes.co.uk', 'wsj.com'].concat(de_funke_medien_domains, de_westfalen_medien_domains, es_epiberica_domains, es_grupo_vocento_domains, es_unidad_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, fr_groupe_nice_matin_domains, it_quotidiano_domains, ca_gcm_domains, nl_dpg_media_domains, no_nhst_media_domains, usa_hearst_comm_domains); +var arr_localstorage_hold = ['abc.es', 'allgaeuer-zeitung.de', 'augsburger-allgemeine.de', 'barrons.com', 'businessoffashion.com', 'challenges.fr', 'charliehebdo.fr', 'cmjornal.pt', 'corriere.it', 'corrieredellosport.it', 'cyclingtips.com', 'eldiario.es', 'elespanol.com', 'elle.fr', 'elpais.com', 'elperiodico.com', 'enotes.com', 'estadao.com.br', 'forbes.com', 'fortune.com', 'economictimes.com', 'freiepresse.de', 'ilfoglio.it', 'inc42.com', 'lanouvellerepublique.fr', 'lesechos.fr', 'mid-day.com', 'nytimes.com', 'nzherald.co.nz', 'scmp.com', 'seekingalpha.com', 'substack.com', 'telegraph.co.uk', 'theatlantic.com', 'thehindu.com', 'thetimes.co.uk', 'wsj.com'].concat(de_funke_medien_domains, de_westfalen_medien_domains, es_epiberica_domains, es_grupo_vocento_domains, es_unidad_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, fr_groupe_nice_matin_domains, it_quotidiano_domains, ca_gcm_domains, nl_dpg_media_domains, no_nhst_media_domains, usa_hearst_comm_domains); if (!matchDomain(arr_localstorage_hold)) { window.localStorage.clear(); } @@ -1078,8 +1078,9 @@ else if (matchDomain('elespanol.com')) { if (window.location.pathname.endsWith('.amp.html')) { amp_unhide_subscr_section('amp-ad, amp-embed'); } else { + let paywall = document.querySelector('div.full-suscriptor-container'); let adverts = document.querySelectorAll('[id*="superior"], [class*="adv"]'); - removeDOMElement(...adverts); + removeDOMElement(paywall, ...adverts); } } @@ -3966,6 +3967,7 @@ else if (matchDomain(usa_outside_mag_domains)) { removeDOMElement(paywall); } if (matchDomain('cyclingtips.com')) { + localStorage.removeItem('av'); let ads = document.querySelectorAll('div[data-block-name="ads"], div#takeover'); removeDOMElement(...ads); } diff --git a/manifest.json b/manifest.json index 015f8f8..4656de1 100644 --- a/manifest.json +++ b/manifest.json @@ -698,5 +698,5 @@ "*://gcm.omerlocdn.com/*", "*://webcache.googleusercontent.com/*" ], - "version": "2.7.9.5" + "version": "2.7.9.6" } diff --git a/sites.js b/sites.js index 4bb350e..1691c3a 100644 --- a/sites.js +++ b/sites.js @@ -393,7 +393,7 @@ var defaultSites = { "El Español": { domain: "elespanol.com", allow_cookies: 1, - block_regex: /(\.eestatic\.com\/assets_js\/web\/v\d\/historia.*\.min\.js|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/ + block_regex: /cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js/ }, "El Espectador": { domain: "elespectador.com", diff --git a/sites_updated.json b/sites_updated.json index 374fc23..a701fdc 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -1,4 +1,14 @@ { + "El Español": { + "domain": "elespanol.com", + "allow_cookies": 1, + "block_regex": "cdn\\.ampproject\\.org\\/v\\d\\/amp-(access|subscriptions)-.+\\.js", + "cs_code": [{ + "cond": "div.full-suscriptor-container", + "rm_elem": 1 + } + ] + }, "Groene Amsterdammer": { "domain": "groene.nl", "remove_cookies_select_hold": ["accept-cookies", "popunder-hidden"],