diff --git a/background.js b/background.js index b39790e..2e140e8 100644 --- a/background.js +++ b/background.js @@ -389,7 +389,8 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) { } // remove cookies for sites medium platform (mainfest.json needs in permissions: ) - if (isSiteEnabled({url: 'https://medium.com'}) && matchUrlDomain('cdn-client.medium.com', details.url) && !matchUrlDomain('medium.com', header_referer)) { + var medium_custom_domain = (isSiteEnabled({url: 'https://medium.com'}) && matchUrlDomain('cdn-client.medium.com', details.url) && !matchUrlDomain('medium.com', header_referer)); + if (medium_custom_domain) { ext_api.cookies.getAll({domain: urlHost(header_referer)}, function(cookies) { for (var i=0; i