From a47ffd722725fbcfd1cd527067f8a1b43c1dd667 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Tue, 25 May 2021 18:00:57 +0200 Subject: [PATCH] Fix-update GElocal.it (social) --- background.js | 2 +- changelog.txt | 1 + contentScript.js | 13 +++++++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/background.js b/background.js index c2d2800..497fac9 100644 --- a/background.js +++ b/background.js @@ -555,7 +555,7 @@ function add_grouped_sites(init_rules) { } for (let domain of it_repubblica_domains) { allow_cookies.push(domain); - blockedRegexes[domain] = /(scripts\.repubblica\.it\/pw\/pw\.js|cdn\.ampproject\.org\/v\d\/amp-(access|ad|user-notification)-.+\.js|\.repstatic\.it\/minify\/sites\/gelocal\/.+\/config\.cache\.php)/; + blockedRegexes[domain] = /(scripts\.repubblica\.it\/pw\/pw\.js|cdn\.ampproject\.org\/v\d\/amp-(access|ad|user-notification)-.+\.js)/; } for (let domain of nl_pg_domains) remove_cookies_select_drop[domain] = ['TID_ID']; diff --git a/changelog.txt b/changelog.txt index e481228..c993ba4 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Fix-update GElocal.it (social) * v2.2.2.0 (2021-05-23) Add MediaNama (India) diff --git a/contentScript.js b/contentScript.js index 1ecad03..988417b 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1063,14 +1063,15 @@ else if (domain = matchDomain(it_repubblica_domains)) { amphtml = {href: (url.split('?')[0] + '/amp').replace('//amp', '/amp')}; if (amphtml) window.location.href = amphtml.href; - } else { - window.setTimeout(function () { - let article_body = document.querySelector('div#article-body[style]'); - if (article_body) - article_body.removeAttribute('style'); - }, 1000); // Delay (in milliseconds) } } + if (!['lastampa.it', 'repubblica.it'].includes(domain)) { + window.setTimeout(function () { + let article_body = document.querySelector('div#article-body[style]'); + if (article_body) + article_body.removeAttribute('style'); + }, 1000); // Delay (in milliseconds) + } } else { let paywall; if (['lastampa.it', 'repubblica.it'].includes(domain)) {