diff --git a/background.js b/background.js index 3afd4eca..f1d524e9 100644 --- a/background.js +++ b/background.js @@ -12,7 +12,7 @@ if (typeof ext_api.action !== 'object') { 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_update = true; var blocked_referer = false; diff --git a/changelog.txt b/changelog.txt index abf0bcad..7169f4be 100644 --- a/changelog.txt +++ b/changelog.txt @@ -6,6 +6,7 @@ Post-release Add GauchaZH Add VmnMedia.nl Group (opt-in to custom sites) Remove Weltkunst.de (fix obsolete) +Fix Defector (cookie) Fix TheTimes.co.uk (overlay) Fix TownNews sites (encrypted) Update popup (Google Search Tool) diff --git a/contentScript.js b/contentScript.js index 2083543b..dcab44c9 100644 --- a/contentScript.js +++ b/contentScript.js @@ -3301,28 +3301,8 @@ else if (matchDomain('dallasnews.com')) { } else if (matchDomain('defector.com')) { - let paywall = document.querySelector('[class^="ContentGate_wrapper__"]'); - if (paywall && dompurify_loaded) { - 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); - } - } + let paywall = document.querySelector('div[class^="ContentGate_wrapper__"]'); + removeDOMElement(paywall); } else if (matchDomain('digiday.com')) { diff --git a/custom/manifest.json b/custom/manifest.json index b8318595..6aa15857 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.1.9.4" + "version": "3.1.9.5" } diff --git a/manifest.json b/manifest.json index 07f8fc98..57bdbef7 100644 --- a/manifest.json +++ b/manifest.json @@ -752,5 +752,5 @@ "*://*.wallkit.net/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.1.9.4" + "version": "3.1.9.5" } diff --git a/sites.js b/sites.js index 636df7bf..a27a06b0 100644 --- a/sites.js +++ b/sites.js @@ -401,7 +401,7 @@ var defaultSites = { }, "Defector": { domain: "defector.com", - allow_cookies: 1 + remove_cookies_select_drop: ["lede_defector_user"] }, "Der Spiegel (link to archive.is)": { domain: "spiegel.de",