Fix Nrc.nl (paywall)

New paywall-overlay for specific articles (test?).
This commit is contained in:
magnolia1234 2019-12-24 14:10:43 +01:00 committed by GitHub
parent 6740393e37
commit 81a30341a3
2 changed files with 13 additions and 3 deletions

View file

@ -165,8 +165,8 @@ if (window.location.href.indexOf('lemonde.fr') !== -1) {
if (window.location.href.indexOf("nytimes.com") !== -1) {
const preview_button = document.querySelector('.css-3s1ce0');
if (preview_button)
preview_button.click();
if (preview_button)
preview_button.click();
}
if (window.location.href.indexOf("caixinglobal.com") !== -1) {
@ -213,6 +213,15 @@ if (window.location.href.indexOf("leparisien.fr") !== -1) {
}, 300); // Delay (in milliseconds)
}
if (window.location.href.indexOf("nrc.nl") !== -1) {
const paywall = document.querySelector('.has-paywall');
if (paywall)
paywall.classList.remove("has-paywall");
const paywall_overlay = document.querySelector('.has-paywall-overlay');
if (paywall_overlay)
paywall_overlay.classList.remove("has-paywall-overlay");
}
function removeDOMElement(...elements) {
for (let element of elements) {
if (element) element.remove();

View file

@ -23,7 +23,8 @@
"*://*.washingtonpost.com/*",
"*://*.economist.com/*",
"*://*.the-tls.co.uk/*",
"*://*.leparisien.fr/*"
"*://*.leparisien.fr/*",
"*://*.nrc.nl/*"
],
"js": ["contentScript.js"]
}