mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-12 01:10:24 +00:00
Fix Defector (cookie)
This commit is contained in:
parent
4c9dfb6488
commit
380cdcc512
@ -12,7 +12,7 @@ if (typeof ext_api.action !== 'object') {
|
|||||||
ext_api.action = ext_api.browserAction;
|
ext_api.action = ext_api.browserAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
const dompurify_sites = ['arcinfo.ch', 'belfasttelegraph.co.uk', 'bloomberg.com', 'cicero.de', 'citywire.com', 'defector.com', 'dn.no', 'ilmanifesto.it', 'inc42.com', 'independent.ie', 'ipolitics.ca', 'italiaoggi.it', 'jacobin.de', 'lecourrierdesstrateges.fr', 'lepoint.fr', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'newscientist.com', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'schwaebische.de', 'sloanreview.mit.edu', 'stratfor.com', 'stylist.co.uk', 'techinasia.com', 'thebulletin.org', 'vn.nl', 'zerohedge.com'].concat(nl_mediahuis_noord_domains, nl_mediahuis_region_domains, no_nhst_media_domains);
|
const dompurify_sites = ['arcinfo.ch', 'belfasttelegraph.co.uk', 'bloomberg.com', 'cicero.de', 'citywire.com', 'dn.no', 'ilmanifesto.it', 'inc42.com', 'independent.ie', 'ipolitics.ca', 'italiaoggi.it', 'jacobin.de', 'lecourrierdesstrateges.fr', 'lepoint.fr', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'newscientist.com', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'schwaebische.de', 'sloanreview.mit.edu', 'stratfor.com', 'stylist.co.uk', 'techinasia.com', 'thebulletin.org', 'vn.nl', 'zerohedge.com'].concat(nl_mediahuis_noord_domains, nl_mediahuis_region_domains, no_nhst_media_domains);
|
||||||
var optin_setcookie = false;
|
var optin_setcookie = false;
|
||||||
var optin_update = true;
|
var optin_update = true;
|
||||||
var blocked_referer = false;
|
var blocked_referer = false;
|
||||||
|
@ -6,6 +6,7 @@ Post-release
|
|||||||
Add GauchaZH
|
Add GauchaZH
|
||||||
Add VmnMedia.nl Group (opt-in to custom sites)
|
Add VmnMedia.nl Group (opt-in to custom sites)
|
||||||
Remove Weltkunst.de (fix obsolete)
|
Remove Weltkunst.de (fix obsolete)
|
||||||
|
Fix Defector (cookie)
|
||||||
Fix TheTimes.co.uk (overlay)
|
Fix TheTimes.co.uk (overlay)
|
||||||
Fix TownNews sites (encrypted)
|
Fix TownNews sites (encrypted)
|
||||||
Update popup (Google Search Tool)
|
Update popup (Google Search Tool)
|
||||||
|
@ -3301,28 +3301,8 @@ else if (matchDomain('dallasnews.com')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
else if (matchDomain('defector.com')) {
|
else if (matchDomain('defector.com')) {
|
||||||
let paywall = document.querySelector('[class^="ContentGate_wrapper__"]');
|
let paywall = document.querySelector('div[class^="ContentGate_wrapper__"]');
|
||||||
if (paywall && dompurify_loaded) {
|
removeDOMElement(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(DOMPurify.sanitize(article_new), article);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} catch (err) {
|
|
||||||
console.log(err);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (matchDomain('digiday.com')) {
|
else if (matchDomain('digiday.com')) {
|
||||||
|
@ -51,5 +51,5 @@
|
|||||||
"webRequestBlocking",
|
"webRequestBlocking",
|
||||||
"*://*/*"
|
"*://*/*"
|
||||||
],
|
],
|
||||||
"version": "3.1.9.4"
|
"version": "3.1.9.5"
|
||||||
}
|
}
|
||||||
|
@ -752,5 +752,5 @@
|
|||||||
"*://*.wallkit.net/*",
|
"*://*.wallkit.net/*",
|
||||||
"*://webcache.googleusercontent.com/*"
|
"*://webcache.googleusercontent.com/*"
|
||||||
],
|
],
|
||||||
"version": "3.1.9.4"
|
"version": "3.1.9.5"
|
||||||
}
|
}
|
||||||
|
2
sites.js
2
sites.js
@ -401,7 +401,7 @@ var defaultSites = {
|
|||||||
},
|
},
|
||||||
"Defector": {
|
"Defector": {
|
||||||
domain: "defector.com",
|
domain: "defector.com",
|
||||||
allow_cookies: 1
|
remove_cookies_select_drop: ["lede_defector_user"]
|
||||||
},
|
},
|
||||||
"Der Spiegel (link to archive.is)": {
|
"Der Spiegel (link to archive.is)": {
|
||||||
domain: "spiegel.de",
|
domain: "spiegel.de",
|
||||||
|
Loading…
Reference in New Issue
Block a user