Fix Economist (Javascript/cookies)

Mobile menu is no longer working.
This commit is contained in:
magnolia1234 2020-01-09 11:44:01 +01:00 committed by GitHub
parent f0a0ad1ec4
commit d371ee35f8
2 changed files with 13 additions and 12 deletions

View file

@ -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\/.+/,

View file

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