diff --git a/background.js b/background.js index 90e19cd..6e1b9ec 100644 --- a/background.js +++ b/background.js @@ -840,11 +840,13 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) { // remove cookies for sites medium platform (custom domains) var medium_custom_domain = (matchUrlDomain('cdn-client.medium.com', details.url) && !matchUrlDomain(['medium.com', 'towardsdatascience.com'], header_referer) && enabledSites.includes('###_medium_custom')); if (medium_custom_domain) { - ext_api.cookies.getAll({domain: urlHost(header_referer)}, function(cookies) { - for (let cookie of cookies) { - ext_api.cookies.remove({url: (cookie.secure ? "https://" : "http://") + cookie.domain + cookie.path, name: cookie.name}); - } - }); + let mc_domain = urlHost(header_referer); + if (!use_twitter_referer.includes(mc_domain)) { + use_twitter_referer.push(mc_domain); + change_headers.push(mc_domain); + } + if (!enabledSites.includes(mc_domain)) + enabledSites.push(mc_domain); } // block external javascript for custom sites (optional) diff --git a/changelog.txt b/changelog.txt index 9ea9a72..abd0f66 100644 --- a/changelog.txt +++ b/changelog.txt @@ -8,7 +8,8 @@ Add Le Un (France) Add Rheinische Post Mediengruppe (only plus if amp) Fix-update ilManifesto.it Fix-update Madsack Mediengruppe (amp) -Fix-update Medium/Towards Data Science (login) & add custom domains in options +Fix-update Medium/Towards Data Science (login) +Fix-update Medium custom domains (login & in options) Fix-update Stratfor (style; not menu) Fix-update Sud Ouest (decode text) Update custom sites (set referer)