In my simple gmail chrome extension - I want to prevent loading of image in a sent mail.
Inside chrome.webRequest.onBeforeRequest.addListener
is working when I include
urls: [ "*://*.googleusercontent.com/*" ]
in the urls array. But this will fire for all the images I only want to fire for this pattern "*://*/#https://mysite/*",
But it is not firing at all - If I include googleusercontent url it is working with details.url in this format -
https://ci6.googleusercontent.com/proxy/IB4W2KvisZjL2rgC....#https://mysite/*
MANIFEST
"permissions": [
"webRequest",
"webRequestBlocking",
"*://*.googleusercontent.com/*",
"*://*/#https://track1/*",
"*://*.googleusercontent.com/*/://track1/*"
],
and in the background script
chrome.webRequest.onBeforeRequest.addListener(
function(details) {
console.log(details);
}, {
urls: [
"*://*/#https://track1/*",
]
}, ['blocking']
);
I think issue is with patter matching but I am not able to understand which is the right pattern to use