From 02c8a7c23bf056be70dc0d43aa7867676f9ea843 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Fri, 30 Jul 2021 09:14:26 +0200 Subject: [PATCH] Fix Grupo Vocento (Spain) --- changelog.txt | 1 + contentScript.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 5de0541..44515b5 100644 --- a/changelog.txt +++ b/changelog.txt @@ -6,6 +6,7 @@ Grouping Quotidiano.net sites (Italy) Remove Le Un (obsolete) Fix Commentary Magazine (new domain) Fix Gestion & El Comercio (Peru) +Fix Grupo Vocento (Spain) Fix Financial News (London) Update remove cookies (faster) diff --git a/contentScript.js b/contentScript.js index 98add27..e3e73e7 100644 --- a/contentScript.js +++ b/contentScript.js @@ -687,11 +687,11 @@ else if (matchDomain('elperiodico.com')) { else if (matchDomain(es_grupo_vocento_domains)) { let url = window.location.href; - let content_exclusive_bg = document.querySelector('.content-exclusive-bg, #cierre_suscripcion'); + let content_exclusive_bg = document.querySelector('.content-exclusive-bg, #cierre_suscripcion, ev-engagement[group-name^="paywall-"]'); let amphtml = document.querySelector('link[rel="amphtml"]'); if (content_exclusive_bg && amphtml) { removeDOMElement(content_exclusive_bg); - window.location.href = url.replace('.html', '_amp.html'); + window.location.href = url.split('?')[0].replace('.html', '_amp.html'); } else if (url.includes('_amp.html')) { let voc_advers = document.querySelectorAll('.voc-adver, amp-embed'); removeDOMElement(...voc_advers);