Fix-update Medium custom domains (login & in options)

This commit is contained in:
magnolia1234 2021-02-07 09:45:57 +01:00
parent 0ef18b6542
commit d96aa7238a
2 changed files with 9 additions and 6 deletions

View file

@ -840,11 +840,13 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
// remove cookies for sites medium platform (custom domains) // 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')); 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) { if (medium_custom_domain) {
ext_api.cookies.getAll({domain: urlHost(header_referer)}, function(cookies) { let mc_domain = urlHost(header_referer);
for (let cookie of cookies) { if (!use_twitter_referer.includes(mc_domain)) {
ext_api.cookies.remove({url: (cookie.secure ? "https://" : "http://") + cookie.domain + cookie.path, name: cookie.name}); 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) // block external javascript for custom sites (optional)

View file

@ -8,7 +8,8 @@ Add Le Un (France)
Add Rheinische Post Mediengruppe (only plus if amp) Add Rheinische Post Mediengruppe (only plus if amp)
Fix-update ilManifesto.it Fix-update ilManifesto.it
Fix-update Madsack Mediengruppe (amp) 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 Stratfor (style; not menu)
Fix-update Sud Ouest (decode text) Fix-update Sud Ouest (decode text)
Update custom sites (set referer) Update custom sites (set referer)