diff --git a/background.js b/background.js index eb824905..c92fc3a9 100644 --- a/background.js +++ b/background.js @@ -471,7 +471,7 @@ function add_grouped_sites(init_rules) { } for (let domain of fr_groupe_la_depeche_domains) { allow_cookies.push(domain); - blockedRegexes[domain] = /(.+\.poool\.fr\/.+|cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent)-.+\.js)/;//|iframe + blockedRegexes[domain] = /(.+\.poool\.fr\/.+|cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent|subscriptions)-.+\.js)/;//|iframe } for (let domain of it_ilmessaggero_domains) blockedRegexes[domain] = /utils\.cedsdigital\.it\/js\/PaywallMeter\.js/; diff --git a/changelog.txt b/changelog.txt index 25735fc2..1affcf8c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -6,6 +6,7 @@ Add Daily Nation (Kenya) Add Houston Chronicle (USA) Add Schleswig-Holsteinischer Zeitungsverlag (Germany) Add Sports Illustrated +Fix-update Groupe La Depeche Fix-update La Croix (timing) Grouping Repubblica.it sites (rules only) Fix popup (update notification; GitLab CORS issue) diff --git a/contentScript.js b/contentScript.js index 7ae568b1..066a7588 100644 --- a/contentScript.js +++ b/contentScript.js @@ -813,33 +813,16 @@ else if (domain = matchDomain(fr_groupe_la_depeche_domains)) { let url = window.location.href; let url_new = url.replace(domain + '/', domain + '/amp/'); if (url.includes(domain + '/amp/')) { - let amp_access_hide = document.querySelector('[amp-access-hide]'); - if (amp_access_hide) { - amp_access_hide.removeAttribute('amp-access-hide'); - } + let subscr_section = document.querySelectorAll('[subscriptions-section="content"]'); + for (let elem of subscr_section) + elem.removeAttribute('subscriptions-section'); let amp_ads = document.querySelectorAll('amp-ad, amp-embed'); removeDOMElement(...amp_ads); } else { - if (!['nrpyrenees.fr', 'petitbleu.fr'].includes(domain)) { - window.setTimeout(function () { - const hidden_section = document.querySelector('.article-full__body-content'); - if (hidden_section) { - hidden_section.classList.remove('article-full__body-content'); - let pars = hidden_section.querySelectorAll("p, h2, div"); - for (let par of pars) { - par.removeAttribute('style'); - } - } - const abon = document.querySelector('#noscript-paywall-content, #noscript-paywall'); - removeDOMElement(abon); - }, 500); // Delay (in milliseconds) - } else { - let paywall = document.querySelector('#noscript-paywall-content'); - if (paywall) { - window.setTimeout(function () { - window.location.href = url_new; - }, 500); // Delay (in milliseconds) - } + let paywall = document.querySelector('div.paywall'); + if (paywall) { + removeDOMElement(paywall); + window.location.href = url_new; } } } diff --git a/manifest.json b/manifest.json index 660aed0a..16f9f60d 100644 --- a/manifest.json +++ b/manifest.json @@ -476,5 +476,5 @@ "*://*.userzoom.com/*", "*://*.wsj.net/*" ], - "version": "2.0.8.7" + "version": "2.0.8.8" } \ No newline at end of file