Fix Economist (Javascript/cookies)

master
magnolia1234 2020-01-09 11:30:05 +01:00 committed by GitHub
parent 2f5900357f
commit c8b4f6e5e4
2 changed files with 14 additions and 13 deletions

View File

@ -55,7 +55,6 @@ const remove_cookies_select_drop = {
'caixinglobal.com': ['CAIXINGLB_LOGIN_UUID'],
'demorgen.be': ['TID_ID'],
'dn.se': ['randomSplusId'],
'economist.com': ['rvuuid'],
'ed.nl': ['temptationTrackingId'],
'nrc.nl': ['counter'],
'theatlantic.com': ['articleViews']
@ -94,7 +93,7 @@ var blockedRegexes = {
'haaretz.com': /haaretz\.com\/hdc\/web\/js\/minified\/header-scripts-int.js.+/,
'nzherald.co.nz': /nzherald\.co\.nz\/.+\/headjs\/.+\.js/,
'businessinsider.com': /(.+\.tinypass\.com\/.+|cdn\.onesignal\.com\/sdks\/.+\.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\/.+/,
@ -210,7 +209,7 @@ chrome.webRequest.onBeforeRequest.addListener(function (details) {
["blocking"]
);
**/
//"*://*.economist.com/*",
// Disable javascript for these sites/general paywall-scripts
chrome.webRequest.onBeforeRequest.addListener(function(details) {
if (!isSiteEnabled(details)) {

View File

@ -1,4 +1,4 @@
var arr_localstorage_hold = ['sfchronicle.com', 'economist.com'];
var arr_localstorage_hold = ['sfchronicle.com'];
var localstorage_hold = arr_localstorage_hold.some(function(url) {
return window.location.href.indexOf(url) !== -1;
});
@ -197,14 +197,16 @@ if (window.location.href.indexOf("nytimes.com") !== -1) {
if (window.location.href.indexOf("economist.com") !== -1) {
document.addEventListener('DOMContentLoaded', () => {
const subscribe = document.querySelector('.subscription-proposition');
const advert = document.querySelector('.advert');
const wrapper = document.getElementById('bottom-page-wrapper');
removeDOMElement(wrapper);
removeDOMElement(subscribe, advert, wrapper);
setTimeout(function () {
const paywall = document.querySelector('.layout-article-regwall'); ;
if (paywall) {
window.location.reload(true);
}
}, 300); // Delay (in milliseconds)
}, 600); // Delay (in milliseconds)
});
}