Merge pull request #382 from magnolia1234/master
Fix The Atlantic & Telegraaf.nl/Ad.nl/Ed.nl & Bloomberg & add DeMorgen.bemaster
commit
7582e24e71
|
@ -17,6 +17,7 @@
|
|||
[Crain's Chicago Business](https://www.chicagobusiness.com)\
|
||||
[Corriere Della Sera](https://www.corriere.it)\
|
||||
[Daily Press](https://www.dailypress.com)\
|
||||
[DeMorgen](https://demorgen.be)\
|
||||
[Denver Post](https://www.denverpost.com)\
|
||||
[De Groene Amsterdammer](https://www.groene.nl)\
|
||||
[De Tijd](https://www.tijd.be)\
|
||||
|
|
|
@ -14,6 +14,7 @@ var defaultSites = {
|
|||
'Crain\'s Chicago Business': 'chicagobusiness.com',
|
||||
'Corriere Della Sera': 'corriere.it',
|
||||
'Daily Press': 'dailypress.com',
|
||||
'DeMorgen': 'demorgen.be',
|
||||
'Denver Post': 'denverpost.com',
|
||||
'De Tijd': 'tijd.be',
|
||||
'De Groene Amsterdammer': 'groene.nl',
|
||||
|
@ -101,6 +102,7 @@ const allow_cookies = [
|
|||
'bostonglobe.com',
|
||||
'cen.acs.org',
|
||||
'chicagobusiness.com',
|
||||
'demorgen.be',
|
||||
'denverpost.com',
|
||||
'economist.com',
|
||||
'ed.nl',
|
||||
|
@ -123,6 +125,7 @@ const allow_cookies = [
|
|||
'telegraaf.nl',
|
||||
'theadvocate.com.au',
|
||||
'theage.com.au',
|
||||
'theatlantic.com',
|
||||
'theaustralian.com.au',
|
||||
'thediplomat.com',
|
||||
'thestar.com',
|
||||
|
@ -141,6 +144,7 @@ const remove_cookies = [
|
|||
'bostonglobe.com',
|
||||
'cen.acs.org',
|
||||
'chicagobusiness.com',
|
||||
'demorgen.be',
|
||||
'denverpost.com',
|
||||
'economist.com',
|
||||
'ed.nl',
|
||||
|
@ -161,6 +165,7 @@ const remove_cookies = [
|
|||
'telegraaf.nl',
|
||||
'theadvocate.com.au',
|
||||
'theage.com.au',
|
||||
'theatlantic.com',
|
||||
'thediplomat.com',
|
||||
'thestar.com',
|
||||
'towardsdatascience.com',
|
||||
|
@ -172,14 +177,17 @@ const remove_cookies = [
|
|||
|
||||
// select specific cookie(s) to hold from remove_cookies domains
|
||||
const remove_cookies_select_hold = {
|
||||
'.nrc.nl': ['nmt_closed_cookiebar'],
|
||||
'.washingtonpost.com': ['wp_gdpr'],
|
||||
'.wsj.com': ['wsjregion']
|
||||
'nrc.nl': ['nmt_closed_cookiebar'],
|
||||
'washingtonpost.com': ['wp_gdpr'],
|
||||
'wsj.com': ['wsjregion']
|
||||
}
|
||||
|
||||
// select only specific cookie(s) to drop from remove_cookies domains
|
||||
const remove_cookies_select_drop = {
|
||||
'www.nrc.nl': ['counter']
|
||||
'ad.nl': ['temptationTrackingId'],
|
||||
'demorgen.be': ['TID_ID'],
|
||||
'ed.nl': ['temptationTrackingId'],
|
||||
'nrc.nl': ['counter']
|
||||
}
|
||||
|
||||
// Override User-Agent with Googlebot
|
||||
|
@ -402,12 +410,13 @@ browser.webRequest.onCompleted.addListener(function(details) {
|
|||
}
|
||||
|
||||
var cookie_domain = cookies[i].domain;
|
||||
var rc_domain = cookie_domain.replace(/^(\.?www\.|\.)/, '');
|
||||
// hold specific cookie(s) from remove_cookies domains
|
||||
if ((cookie_domain in remove_cookies_select_hold) && remove_cookies_select_hold[cookie_domain].includes(cookies[i].name)){
|
||||
if ((rc_domain in remove_cookies_select_hold) && remove_cookies_select_hold[rc_domain].includes(cookies[i].name)){
|
||||
continue; // don't remove specific cookie
|
||||
}
|
||||
// drop only specific cookie(s) from remove_cookies domains
|
||||
if ((cookie_domain in remove_cookies_select_drop) && !(remove_cookies_select_drop[cookie_domain].includes(cookies[i].name))){
|
||||
if ((rc_domain in remove_cookies_select_drop) && !(remove_cookies_select_drop[rc_domain].includes(cookies[i].name))){
|
||||
continue; // only remove specific cookie
|
||||
}
|
||||
|
||||
|
|
|
@ -106,24 +106,27 @@ if (window.location.href.indexOf("bloombergquint.com") !== -1) {
|
|||
|
||||
if (window.location.href.indexOf("bloomberg.com") !== -1) {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const fence = document.querySelector('.fence-body');
|
||||
if (fence){
|
||||
fence.classList.remove('fence-body');
|
||||
}
|
||||
const paywall = document.getElementById('paywall-banner');
|
||||
removeDOMElement(paywall);
|
||||
});
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf('telegraaf.nl') !== -1) {
|
||||
const paywall = document.getElementById('TEMPRORARY_METERING_ID');
|
||||
if (paywall) {
|
||||
window.location.reload(1);
|
||||
}
|
||||
setTimeout(function () {
|
||||
const paywall = document.getElementById('TEMPRORARY_METERING_ID');
|
||||
if (paywall) {
|
||||
window.location.reload(true);
|
||||
}
|
||||
}, 1000); // Delay (in milliseconds)
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf('ed.nl') !== -1) {
|
||||
const paywall = document.querySelector('.article__component.article__component--paywall-module-notification');
|
||||
if (paywall) {
|
||||
paywall.remove();
|
||||
paywall = null;
|
||||
}
|
||||
if (window.location.href.indexOf('ad.nl') !== -1 || window.location.href.indexOf('ed.nl') !== -1) {
|
||||
let paywall = document.querySelector('.article__component.article__component--paywall-module-notification');
|
||||
removeDOMElement(paywall);
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf("parool.nl") !== -1 || window.location.href.indexOf("trouw.nl") !== -1 || window.location.href.indexOf("volkskrant.nl") !== -1) {
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
"*://*.bloomberg.com/*",
|
||||
"*://*.businessinsider.com/*",
|
||||
"*://*.caixinglobal.com/*",
|
||||
"*://*.ad.nl/*",
|
||||
"*://*.ed.nl/*",
|
||||
"*://*.haaretz.co.il/*",
|
||||
"*://*.lemonde.fr/*",
|
||||
|
@ -142,7 +143,8 @@
|
|||
"*://*.vn.nl/*",
|
||||
"*://*.lemonde.fr/*",
|
||||
"*://*.scientificamerican.com/*",
|
||||
"*://*.thehindu.com/*"
|
||||
"*://*.thehindu.com/*",
|
||||
"*://*.demorgen.be/*"
|
||||
],
|
||||
"version": "1.6.0"
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ var defaultSites = {
|
|||
'Crain\'s Chicago Business': 'chicagobusiness.com',
|
||||
'Corriere Della Sera': 'corriere.it',
|
||||
'Daily Press': 'dailypress.com',
|
||||
'DeMorgen': 'demorgen.be',
|
||||
'Denver Post': 'denverpost.com',
|
||||
'De Groene Amsterdammer': 'groene.nl',
|
||||
'De Tijd': 'tijd.be',
|
||||
|
|
Loading…
Reference in New Issue