Fix LeParisien.fr (block TinyPass paywall)

merge-requests/1/head
magnolia1234 5 years ago committed by GitHub
parent 4479d243a1
commit a2a953f24c

@ -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)"

@ -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)

Loading…
Cancel
Save