2018-07-15 01:24:13 +02:00
|
|
|
window.localStorage.clear();
|
2018-07-08 00:11:09 +02:00
|
|
|
if (window.location.href.indexOf("bizjournals.com") !== -1) {
|
2018-06-30 21:48:40 +02:00
|
|
|
const hiddenStory = document.getElementsByClassName(
|
|
|
|
"js-pre-chunks__story-body"
|
|
|
|
);
|
2018-06-30 21:53:50 +02:00
|
|
|
if (hiddenStory && hiddenStory.length>0) {
|
2018-06-30 21:48:40 +02:00
|
|
|
hiddenStory[0].style.display = "block";
|
|
|
|
}
|
|
|
|
|
2018-06-30 21:53:50 +02:00
|
|
|
const payWallMessage = document.getElementsByClassName(
|
|
|
|
"chunk chunk--flex@lg chunk--paywall"
|
|
|
|
);
|
|
|
|
if (payWallMessage && payWallMessage.length>0 ) {
|
2018-06-30 21:48:40 +02:00
|
|
|
payWallMessage[0].style.display = "none";
|
|
|
|
}
|
2018-07-08 00:11:09 +02:00
|
|
|
} else if (window.location.href.indexOf("businessinsider.com") !== -1) {
|
|
|
|
const paywall = document.getElementsByClassName(
|
|
|
|
"tp-modal"
|
|
|
|
);
|
|
|
|
while (paywall.length > 0) {
|
|
|
|
paywall[0].parentNode.removeChild(paywall[0]);
|
|
|
|
}
|
2018-12-02 05:33:21 +01:00
|
|
|
} else if (location.hostname.endsWith('haaretz.co.il')) {
|
|
|
|
const html = document.getElementsByTagName('html');
|
|
|
|
if (html && html.length > 0) {
|
|
|
|
html[0].style['overflow-y'] = 'auto';
|
|
|
|
}
|
|
|
|
const msg = document.getElementById('article-wrapper');
|
|
|
|
if (msg) {
|
|
|
|
msg.style['display'] = 'none';
|
|
|
|
}
|
2019-06-27 05:26:30 +02:00
|
|
|
} else if (window.location.href.indexOf("nzherald.co.nz") !== -1) {
|
|
|
|
const paywall = document.getElementById(
|
|
|
|
"article-content"
|
|
|
|
);
|
2019-09-07 08:13:32 +02:00
|
|
|
if (paywall) {
|
|
|
|
paywall.classList.remove('premium-content');
|
|
|
|
paywall.classList.add('full-content');
|
|
|
|
var paras = paywall.querySelectorAll("p, span, h2, div");
|
|
|
|
var delClass = "";
|
|
|
|
for (var i = 0; i < paras.length; i++) {
|
|
|
|
if (paras[i].nodeName == 'P' || paras[i].nodeName == 'SPAN') {
|
|
|
|
paras[i].classList.remove("ellipsis");
|
|
|
|
if (delClass == "" && paras[i].className != "") {
|
|
|
|
delClass = paras[i].className;
|
|
|
|
} else {
|
|
|
|
if (delClass != "") {
|
|
|
|
paras[i].classList.remove(delClass);
|
|
|
|
}
|
|
|
|
}
|
2019-06-27 05:26:30 +02:00
|
|
|
}
|
2019-09-07 08:13:32 +02:00
|
|
|
paras[i].removeAttribute('style');
|
2019-06-27 05:26:30 +02:00
|
|
|
}
|
2019-09-07 08:13:32 +02:00
|
|
|
}
|
2018-12-06 22:23:04 +01:00
|
|
|
} else if (location.hostname.endsWith('rep.repubblica.it')) {
|
|
|
|
if (location.href.includes("/pwa/")) {
|
|
|
|
location.href = location.href.replace("/pwa/", "/ws/detail/");
|
|
|
|
}
|
|
|
|
|
|
|
|
if (location.href.includes("/ws/detail/")) {
|
2019-01-25 16:29:06 +01:00
|
|
|
const paywall = document.querySelector('.paywall[subscriptions-section="content"]');
|
2018-12-11 12:02:43 +01:00
|
|
|
if (paywall) {
|
2019-01-25 16:29:06 +01:00
|
|
|
paywall.removeAttribute('subscriptions-section');
|
|
|
|
const preview = document.querySelector('div[subscriptions-section="content-not-granted"]');
|
|
|
|
if (preview) {
|
|
|
|
preview.remove();
|
|
|
|
}
|
2018-12-06 22:23:04 +01:00
|
|
|
}
|
|
|
|
}
|
2019-06-23 21:42:33 +02:00
|
|
|
} else if (window.location.href.indexOf("wsj.com") !== -1) {
|
|
|
|
if (location.href.includes('/articles/')) {
|
2019-09-21 15:50:50 +02:00
|
|
|
setTimeout(function() {
|
2019-06-23 21:42:33 +02:00
|
|
|
document.querySelector('.close-btn').click();
|
|
|
|
}, 2000);
|
|
|
|
}
|
2019-06-26 15:37:00 +02:00
|
|
|
} else if (window.location.href.indexOf("washingtonpost.com") !== -1) {
|
|
|
|
if (location.href.includes('/gdpr-consent/')) {
|
|
|
|
document.querySelector('.gdpr-consent-container .continue-btn.button.free').click();
|
|
|
|
|
|
|
|
setTimeout(function (){
|
|
|
|
|
|
|
|
const gdprcheckbox = document.querySelector('.gdpr-consent-container .consent-page:not(.hide) #agree');
|
|
|
|
if (gdprcheckbox) {
|
|
|
|
gdprcheckbox.checked = true;
|
|
|
|
gdprcheckbox.dispatchEvent(new Event('change'));
|
|
|
|
|
|
|
|
document.querySelector('.gdpr-consent-container .consent-page:not(.hide) .continue-btn.button.accept-consent').click();
|
|
|
|
}
|
2019-09-21 15:50:50 +02:00
|
|
|
}, 300); // Delay (in milliseconds)
|
2019-06-26 15:37:00 +02:00
|
|
|
}
|
2019-10-14 14:52:27 +02:00
|
|
|
} else if (window.location.href.indexOf('telegraaf.nl') !== -1) {
|
|
|
|
const paywall = document.getElementById('TEMPRORARY_METERING_ID');
|
|
|
|
if (paywall) {
|
|
|
|
window.location.reload(1);
|
|
|
|
}
|
|
|
|
} else 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;
|
|
|
|
}
|
|
|
|
} else if (window.location.href.indexOf("parool.nl") !== -1 || window.location.href.indexOf("trouw.nl") !== -1 || window.location.href.indexOf("volkskrant.nl") !== -1) {
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
const paywall = document.querySelector('div[data-temptation-position="ARTICLE_BOTTOM"]');
|
|
|
|
const hidden_section = document.querySelector('div[data-temptation-position="ARTICLE_INLINE"]');
|
|
|
|
removeDOMElement(paywall, hidden_section);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function removeDOMElement(...elements) {
|
|
|
|
for (let element of elements) {
|
|
|
|
if (element) element.remove();
|
|
|
|
}
|
2019-06-26 15:37:00 +02:00
|
|
|
}
|