From 0c4645f200d2cdbda9bc7e97b0f31e7cb0b7e6aa Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Tue, 26 Apr 2022 07:57:16 +0200 Subject: [PATCH] Fix eNotes --- changelog.txt | 1 + contentScript.js | 12 ++++++------ sites_updated.json | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/changelog.txt b/changelog.txt index f366f4e3..fce2386c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Fix eNotes Fix Lequipe.fr (json) * v2.6.6.0 (2022-04-24) diff --git a/contentScript.js b/contentScript.js index 75bd21c2..a3e0d5ea 100644 --- a/contentScript.js +++ b/contentScript.js @@ -34,7 +34,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', 'eldiario.es', 'elespanol.com', 'elle.fr', 'elpais.com', 'elperiodico.com', 'estadao.com.br', 'forbes.com', 'fortune.com', 'freiepresse.de', 'ilfoglio.it', 'inc42.com', 'kurier.at', 'lanouvellerepublique.fr', 'lesechos.fr', 'mid-day.com', 'muensterschezeitung.de', 'nytimes.com', 'nzherald.co.nz', 'scmp.com', 'seekingalpha.com', 'telegraph.co.uk', 'thehindu.com', 'thetimes.co.uk', 'westfalen-blatt.de', 'wn.de', 'wsj.com'].concat(de_funke_media_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, 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', 'eldiario.es', 'elespanol.com', 'elle.fr', 'elpais.com', 'elperiodico.com', 'enotes.com', 'estadao.com.br', 'forbes.com', 'fortune.com', 'freiepresse.de', 'ilfoglio.it', 'inc42.com', 'kurier.at', 'lanouvellerepublique.fr', 'lesechos.fr', 'mid-day.com', 'muensterschezeitung.de', 'nytimes.com', 'nzherald.co.nz', 'scmp.com', 'seekingalpha.com', 'telegraph.co.uk', 'thehindu.com', 'thetimes.co.uk', 'westfalen-blatt.de', 'wn.de', 'wsj.com'].concat(de_funke_media_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, no_nhst_media_domains, usa_hearst_comm_domains); if (!matchDomain(arr_localstorage_hold)) { window.localStorage.clear(); } @@ -2651,13 +2651,13 @@ else if (matchDomain('economist.com')) { } else if (matchDomain('enotes.com')) { - let paywall = document.querySelector('#enotes-paywall'); - if (paywall) { - removeDOMElement(paywall); - let blurred = document.querySelectorAll('div.c-answer__body > div[class^="_"]'); + let paywall = document.querySelectorAll('section.c-cta-section'); + if (paywall.length) { + removeDOMElement(...paywall); + let blurred = document.querySelectorAll('div[class^="_"]'); for (let elem of blurred) elem.removeAttribute('class'); - let intro = document.querySelectorAll('div.c-answer__body > p'); + let intro = document.querySelectorAll('div.o-rte-text[id] > p:not([class]), div.o-rte-text[id] > h3'); for (let elem of intro) removeDOMElement(elem); } diff --git a/sites_updated.json b/sites_updated.json index 7904c892..0461e847 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -29,13 +29,13 @@ "domain": "enotes.com", "allow_cookies": 1, "cs_code": [{ - "cond": "#enotes-paywall", + "cond": "section.c-cta-section", "rm_elem": 1, "elems": [{ - "cond": "div.c-answer__body > div[class^=\"_\"]", + "cond": "div[class^=\"_\"]", "rm_attrib": "class" }, { - "cond": "div.c-answer__body > p", + "cond": "div.o-rte-text[id] > p:not([class]), div.o-rte-text[id] > h3a", "rm_elem": 1 } ]