I'm trying to create an extension to analyze requests made on Chrome browsers but I do not work it Warning never fire.
manifest.json
{"name": "test", "description": "test", "version": "1.0", "Manifest_version": 2 , "Permissions": ["Background", "Tab", "WebRCC", "WebRequestBlocking", "*: // * / *"], "Background": {"Script": ["Background .js"], "Continuous": true}}
background.js
var callback = function (description) {warning ("hello"); }; Var filter = {"*: // * / *"}; Var opt_extraInfoSpec = []; Chrome.webRequest.onBeforeRequest.addListener (callback, filter, opt_extraInfoSpec);
Why is not this my warning? Your filter is incorrectly formatted - it is not a valid object, but at least 'url' is in it. The property needs to be included if you do not want all the URLs, then use it:
var filter = {urls: ["all_urls" gt; "}};
For exact details on the format of the filter, refer to:
No comments:
Post a Comment