diff --git a/background.js b/background.js index 512826c..ef47431 100644 --- a/background.js +++ b/background.js @@ -219,7 +219,6 @@ const remove_cookies_select_drop = { 'bostonglobe.com': ['FMPaywall'], 'caixinglobal.com': ['CAIXINGLB_LOGIN_UUID'], 'demorgen.be': ['TID_ID'], - 'economist.com': ['rvuuid'], 'ed.nl': ['temptationTrackingId'], 'nrc.nl': ['counter'] } @@ -256,7 +255,7 @@ const blockedRegexes = { 'thenation.com': /thenation\.com\/.+\/paywall-script\.php/, 'haaretz.co.il': /haaretz\.co\.il\/htz\/js\/inter\.js/, 'nzherald.co.nz': /nzherald\.co\.nz\/.+\/headjs\/.+\.js/, -'economist.com': /.+\.tinypass\.com\/.+/, +'economist.com': /(.+\.tinypass\.com\/.+|economist\.com\/_next\/static\/runtime\/main.+\.js)/, 'lrb.co.uk': /.+\.tinypass\.com\/.+/, 'bostonglobe.com': /meter\.bostonglobe\.com\/js\/.+/, 'foreignpolicy.com': /.+\.tinypass\.com\/.+/, diff --git a/contentScript.js b/contentScript.js index fad514c..3414835 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1,4 +1,4 @@ -var arr_localstorage_hold = ['economist.com']; +var arr_localstorage_hold = []; var localstorage_hold = arr_localstorage_hold.some(function(url) { return window.location.href.indexOf(url) !== -1; }); @@ -185,15 +185,17 @@ if (window.location.href.indexOf("caixinglobal.com") !== -1) { if (window.location.href.indexOf("economist.com") !== -1) { document.addEventListener('DOMContentLoaded', () => { - const wrapper = document.getElementById('bottom-page-wrapper'); - removeDOMElement(wrapper); - setTimeout(function () { - const paywall = document.querySelector('.layout-article-regwall');; - if (paywall) { - window.location.reload(true); - } - }, 600); // Delay (in milliseconds) - }); + const subscribe = document.querySelector('.subscription-proposition'); + const advert = document.querySelector('.advert'); + const wrapper = document.getElementById('bottom-page-wrapper'); + removeDOMElement(subscribe, advert, wrapper); + setTimeout(function () { + const paywall = document.querySelector('.layout-article-regwall'); ; + if (paywall) { + window.location.reload(true); + } + }, 600); // Delay (in milliseconds) + }); } if (window.location.href.indexOf("the-tls.co.uk") !== -1) {