mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 06:27:48 +01:00
Fix Economist inactive links
Plus remove banner from American Affairs (Journal).
This commit is contained in:
parent
89f0d13f8c
commit
42ce0b8ffc
1 changed files with 18 additions and 0 deletions
|
@ -195,6 +195,19 @@ if (window.location.href.indexOf("economist.com") !== -1) {
|
|||
window.location.reload(true);
|
||||
}
|
||||
}, 600); // Delay (in milliseconds)
|
||||
const p_article = document.querySelectorAll('p.article__body-text');
|
||||
var href;
|
||||
for (let i = 0; i < p_article.length; i++) {
|
||||
const anchor = document.querySelectorAll('a');
|
||||
href = '';
|
||||
for (let j = 0; j < anchor.length; j++) {
|
||||
if (anchor[j].href) {
|
||||
href = anchor[j].href;
|
||||
} else {
|
||||
anchor[j].href = href;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -422,6 +435,11 @@ if (window.location.href.indexOf("newyorker.com") !== -1) {
|
|||
removeDOMElement(paywall_bar);
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf("americanaffairsjournal.org") !== -1) {
|
||||
const paywall_bar = document.querySelector('.paywall-notification-bar-wrapper');
|
||||
removeDOMElement(paywall_bar);
|
||||
}
|
||||
|
||||
// General Functions
|
||||
function removeDOMElement(...elements) {
|
||||
for (let element of elements) {
|
||||
|
|
Loading…
Reference in a new issue