Fix Medium content on non-Medium sites (e.g. mail)
Medium-sites contain resources of cdn-client.medium.com.
This commit is contained in:
parent
78f2cd984b
commit
04e2393523
@ -345,7 +345,7 @@ chrome.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
||||
}
|
||||
|
||||
// remove cookies for sites medium platform (mainfest.json needs in permissions: <all_urls>)
|
||||
if (isSiteEnabled({url: '.medium.com'}) && details.url.indexOf('.medium.com') !== -1 && header_referer.indexOf('.medium.com') === -1 && header_referer.indexOf('outlook.live.com') ===-1){
|
||||
if (isSiteEnabled({url: '.medium.com'}) && details.url.indexOf('cdn-client.medium.com') !== -1 && header_referer.indexOf('.medium.com') === -1) {
|
||||
var domainVar = new URL(header_referer).hostname;
|
||||
chrome.cookies.getAll({domain: domainVar}, function(cookies) {
|
||||
for (var i=0; i<cookies.length; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user