From 4947b58a38cbeec46f811d24322d5895505d9ce9 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Tue, 5 Jul 2022 21:36:25 +0200 Subject: [PATCH] Fix ABC.es (mobile) --- changelog.txt | 1 + contentScript.js | 8 +++++++- manifest.json | 2 +- sites_updated.json | 14 ++++++++++++++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 862258b..a00ea69 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release Add Architectural Digest (Conde Nast) +Fix ABC.es (mobile) Fix Knack.be & LeVif.be (subdomains-text) * v2.7.4.0 (2022-07-03) diff --git a/contentScript.js b/contentScript.js index 356c8b9..e949838 100644 --- a/contentScript.js +++ b/contentScript.js @@ -999,15 +999,21 @@ else } else if (window.location.hostname.match(/\.(es|pt|cat)$/) || matchDomain(['diariocordoba.com', 'diariovasco.com', 'elconfidencial.com', 'elcorreo.com', 'elespanol.com', 'elpais.com', 'elperiodico.com', 'elperiodicodearagon.com', 'elperiodicoextremadura.com', 'elperiodicomediterraneo.com', 'emporda.info', 'expansion.com', 'larioja.com', 'levante-emv.com', 'marca.com', 'politicaexterior.com'])) {//spain/portugal if (matchDomain('abc.es')) { - let paywall = document.querySelector('.cierre-suscripcion:not([style="display: none;"])'); + let paywall = document.querySelector('div.voc-paywall'); if (window.location.pathname.endsWith('_amp.html')) { amp_unhide_access_hide('="result=\'ALLOW_ACCESS\'"', '', 'amp-ad, amp-embed'); removeDOMElement(paywall); + let body_top = document.querySelector('body#top'); + if (body_top) + body_top.removeAttribute('id'); } else { let amphtml = document.querySelector('link[rel="amphtml"]'); if (paywall && amphtml) { removeDOMElement(paywall); window.location.href = amphtml.href; + } else { + let banners = document.querySelectorAll('div.ev-em-modal, span.mega-superior'); + removeDOMElement(...banners); } } } diff --git a/manifest.json b/manifest.json index 595581a..3b8505f 100644 --- a/manifest.json +++ b/manifest.json @@ -689,5 +689,5 @@ "*://*.wsj.net/*", "*://webcache.googleusercontent.com/*" ], - "version": "2.7.4.2" + "version": "2.7.4.3" } diff --git a/sites_updated.json b/sites_updated.json index a63d037..91fe118 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -1,4 +1,18 @@ { + "ABC.es": { + "domain": "abc.es", + "allow_cookies": 1, + "block_regex": "(\\.evolok\\.net\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-access-.+\\.js)", + "useragent": "googlebot", + "amp_redirect": { + "paywall": "div.voc-paywall" + }, + "cs_code": [{ + "cond": "body#top", + "rm_attrib": "id" + } + ] + }, "Alma Talent (Finland)": { "domain": "###_fi_alma_talent", "group": [