mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-12 01:10:24 +00:00
Add Defector
This commit is contained in:
parent
6f463457af
commit
797d521a75
@ -184,6 +184,7 @@ Grouped in options:\
|
||||
[Atavist Magazine](https://magazine.atavist.com) -
|
||||
[Axios](https://www.axios.com) -
|
||||
[Commentary Magazine](https://www.commentary.org) -
|
||||
[Defector](https://defector.com) -
|
||||
[Field & Stream](https://www.fieldandstream.com) -
|
||||
[First Things](https://www.firstthings.com) -
|
||||
[Harper's Magazine](https://harpers.org) -
|
||||
|
@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox
|
||||
Updates: https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases
|
||||
|
||||
Post-release
|
||||
Add Defector
|
||||
Remove Iltalehti.fi (fix obsolete)
|
||||
Fix ilManifesto.it (timing)
|
||||
Fix iPolitics.ca (refresh)
|
||||
|
@ -3044,6 +3044,31 @@ else if (matchDomain('dallasnews.com')) {
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('defector.com')) {
|
||||
let paywall = document.querySelector('[class^="ContentGate_wrapper__"]');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
let url = window.location.href;
|
||||
try {
|
||||
fetch(url)
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
response.text().then(html => {
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString(html, 'text/html');
|
||||
let article_new = doc.querySelector('div[class^="PostContent_wrapper__"]');
|
||||
let article = document.querySelector('div[class^="PostContent_wrapper__"]');
|
||||
if (article && article_new)
|
||||
article.parentNode.replaceChild(article_new, article);
|
||||
});
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('digiday.com')) {
|
||||
if (window.location.pathname.endsWith('/amp/')) {
|
||||
amp_unhide_access_hide('="NOT p.showPageviewExpired AND NOT p.showPayWall"', '', 'amp-ad, .advertisement, .ad-wrapper');
|
||||
|
@ -51,5 +51,5 @@
|
||||
"webRequestBlocking",
|
||||
"*://*/*"
|
||||
],
|
||||
"version": "3.0.9.3"
|
||||
"version": "3.0.9.4"
|
||||
}
|
||||
|
@ -176,6 +176,7 @@
|
||||
"*://*.dailytelegraph.com.au/*",
|
||||
"*://*.dailywire.com/*",
|
||||
"*://*.dallasnews.com/*",
|
||||
"*://*.defector.com/*",
|
||||
"*://*.democratandchronicle.com/*",
|
||||
"*://*.demorgen.be/*",
|
||||
"*://*.denverpost.com/*",
|
||||
@ -736,5 +737,5 @@
|
||||
"*://*.wallkit.net/*",
|
||||
"*://webcache.googleusercontent.com/*"
|
||||
],
|
||||
"version": "3.0.9.3"
|
||||
"version": "3.0.9.4"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user