From b79a8585d6bd5bb62bfab16d4fbdc99138dd342e Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sun, 29 Aug 2021 08:38:59 +0200 Subject: [PATCH] Fix Repubblica.it (podcasts) --- background.js | 2 ++ changelog.txt | 1 + contentScript.js | 11 ----------- manifest.json | 2 +- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/background.js b/background.js index 2e56a777..c89e7634 100644 --- a/background.js +++ b/background.js @@ -605,6 +605,8 @@ function add_grouped_sites(init_rules) { } for (let domain of it_repubblica_domains) { allow_cookies.push(domain); + if (['ilsecoloxix.it', 'lastampa.it', 'repubblica.it'].includes(domain)) + use_google_bot.push(domain); 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) { diff --git a/changelog.txt b/changelog.txt index b1e7fc43..fda4114f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,6 +5,7 @@ Post-release Add Forbes Add Law360 (free articles only) Fix Bloomberg (graphics) +Fix Repubblica.it (podcasts) * v2.3.4.1 (2021-08-23) Fix group Crain Communications diff --git a/contentScript.js b/contentScript.js index 69c5ff0c..aeb4d48e 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1079,17 +1079,6 @@ else if (matchDomain('rep.repubblica.it')) { else if (domain = matchDomain(it_repubblica_domains)) { let url = window.location.href.split('?')[0]; if (!url.match(/\amp(\/)?$/)) { - let premium = document.querySelector('.paywall-adagio, #paywall'); - if (premium) { - removeDOMElement(premium); - if (['ilsecoloxix.it', 'lastampa.it', 'repubblica.it'].includes(domain)) { - let amphtml = document.querySelector('link[rel="amphtml"]'); - if (!amphtml) - amphtml = {href: (url.split('?')[0] + '/amp').replace('//amp', '/amp')}; - if (amphtml) - window.location.href = amphtml.href; - } - } if (!['ilsecoloxix.it', 'lastampa.it', 'repubblica.it'].includes(domain)) { window.setTimeout(function () { let article_body = document.querySelector('div#article-body[style]'); diff --git a/manifest.json b/manifest.json index 21f02670..ed5bf18c 100644 --- a/manifest.json +++ b/manifest.json @@ -556,5 +556,5 @@ "*://*.wallkit.net/*", "*://*.wsj.net/*" ], - "version": "2.3.4.4" + "version": "2.3.4.5" } \ No newline at end of file