chrome.webRequest.onBeforeRequest.addListener(function(details) {
if (localStorage.on == '1') {
return {cancel:true};
}
}, {urls: ["*://*.domain1.net/*","*://*.domain2.com/*","*://*.domain3.com/*"], types: ["script","xmlhttprequest","other"]}, ["blocking"]);
I don't see any way I can negate the URL pattern. Basically I want to match and block everything except those 3 domains. I thought of returning cancel:true for and the exact content for the 3 domains. First of will that work or will one listener "over-take" the other? How can I return the exact content (So no more cancel:true).