Fix Ad.nl/Ed.nl (cookie)

Fix for new cookie-scheme (drop specific cookie).
master
magnolia1234 2019-11-16 22:57:23 +01:00 committed by GitHub
parent 5e54e795d3
commit 9e43913e64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 8 deletions

View File

@ -181,6 +181,12 @@ const remove_cookies_select_hold = {
// select only specific cookie(s) to drop from remove_cookies domains // select only specific cookie(s) to drop from remove_cookies domains
const remove_cookies_select_drop = { const remove_cookies_select_drop = {
'.ad.nl': ['temptationTrackingId'],
'.www.ad.nl': ['none'],
'www.ad.nl': ['none'],
'.ed.nl': ['temptationTrackingId'],
'.www.ed.nl': ['none'],
'www.ed.nl': ['none'],
'www.nrc.nl': ['counter'] 'www.nrc.nl': ['counter']
} }

View File

@ -115,8 +115,9 @@ if (window.location.href.indexOf("bloombergquint.com") !== -1) {
if (window.location.href.indexOf("bloomberg.com") !== -1) { if (window.location.href.indexOf("bloomberg.com") !== -1) {
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
const fence = document.querySelector('.fence-body'); const fence = document.querySelector('.fence-body');
if (fence) if (fence){
fence.classList.remove('fence-body'); fence.classList.remove('fence-body');
}
const paywall = document.getElementById('paywall-banner'); const paywall = document.getElementById('paywall-banner');
removeDOMElement(paywall); removeDOMElement(paywall);
}); });
@ -128,15 +129,12 @@ if (window.location.href.indexOf('telegraaf.nl') !== -1) {
if (paywall) { if (paywall) {
window.location.reload(true); window.location.reload(true);
} }
}, 500); // Delay (in milliseconds) }, 1000); // Delay (in milliseconds)
} }
if (window.location.href.indexOf('ed.nl') !== -1) { if (window.location.href.indexOf('ad.nl') !== -1 || window.location.href.indexOf('ed.nl') !== -1) {
const paywall = document.querySelector('.article__component.article__component--paywall-module-notification'); let paywall = document.querySelector('.article__component.article__component--paywall-module-notification');
if (paywall) { removeDOMElement(paywall);
paywall.remove();
paywall = null;
}
} }
if (window.location.href.indexOf("parool.nl") !== -1 || window.location.href.indexOf("trouw.nl") !== -1 || window.location.href.indexOf("volkskrant.nl") !== -1) { if (window.location.href.indexOf("parool.nl") !== -1 || window.location.href.indexOf("trouw.nl") !== -1 || window.location.href.indexOf("volkskrant.nl") !== -1) {

View File

@ -9,6 +9,7 @@
"*://*.bloomberg.com/*", "*://*.bloomberg.com/*",
"*://*.businessinsider.com/*", "*://*.businessinsider.com/*",
"*://*.caixinglobal.com/*", "*://*.caixinglobal.com/*",
"*://*.ad.nl/*",
"*://*.ed.nl/*", "*://*.ed.nl/*",
"*://*.haaretz.co.il/*", "*://*.haaretz.co.il/*",
"*://*.lemonde.fr/*", "*://*.lemonde.fr/*",