From a2a953f24c0ee1098d7f94f0f4607c8deba02949 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sun, 5 Jan 2020 17:30:10 +0100 Subject: [PATCH] Fix LeParisien.fr (block TinyPass paywall) --- background.js | 3 ++- contentScript.js | 12 ------------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/background.js b/background.js index 6f6e7f0..7d75274 100644 --- a/background.js +++ b/background.js @@ -260,7 +260,8 @@ const blockedRegexes = { 'spectator.co.uk': /.+\.tinypass\.com\/.+/, 'newcastleherald.com.au': /.+cdn-au\.piano\.io\/api\/tinypass.+\.js/, 'afr.com': /afr\.com\/assets\/vendorsReactRedux_client.+\.js/, -'theglobeandmail.com': /theglobeandmail\.com\/pb\/resources\/scripts\/build\/chunk-bootstraps\/.+\.js/ +'theglobeandmail.com': /theglobeandmail\.com\/pb\/resources\/scripts\/build\/chunk-bootstraps\/.+\.js/, +'leparisien.fr': /.+\.tinypass\.com\/.+/ }; const userAgentDesktop = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" diff --git a/contentScript.js b/contentScript.js index 84fd12a..2a0050e 100644 --- a/contentScript.js +++ b/contentScript.js @@ -201,18 +201,6 @@ if (window.location.href.indexOf("the-tls.co.uk") !== -1) { removeDOMElement(paywall); } -if (window.location.href.indexOf("leparisien.fr") !== -1) { - window.removeEventListener('scroll', this.scrollListener); - const paywall = document.querySelector('.relative.piano-paywall.below_nav.sticky'); - removeDOMElement(paywall); - setTimeout(function () { - var content = document.getElementsByClassName('content'); - for (var i = 0; i < content.length; i++) { - content[i].removeAttribute("style"); - } - }, 300); // Delay (in milliseconds) -} - if (window.location.href.indexOf("nrc.nl") !== -1) { const paywall = document.querySelector('.has-paywall'); if (paywall)