mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 05:27:48 +01:00
Fix else if conflict
This commit is contained in:
parent
8e0fccbfe5
commit
e57fc90521
1 changed files with 23 additions and 17 deletions
|
@ -88,23 +88,6 @@ if (window.location.href.indexOf("bizjournals.com") !== -1) {
|
|||
}
|
||||
}, 300); // Delay (in milliseconds)
|
||||
}
|
||||
} 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);
|
||||
});
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf("bloomberg.com") !== -1) {
|
||||
|
@ -112,6 +95,29 @@ if (window.location.href.indexOf("bloomberg.com") !== -1) {
|
|||
removeDOMElement(paywall);
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf('telegraaf.nl') !== -1) {
|
||||
const paywall = document.getElementById('TEMPRORARY_METERING_ID');
|
||||
if (paywall) {
|
||||
window.location.reload(1);
|
||||
}
|
||||
}
|
||||
|
||||
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("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();
|
||||
|
|
Loading…
Reference in a new issue