diff --git a/requests/backgroud.js b/requests/backgroud.js new file mode 100644 index 0000000..c430408 --- /dev/null +++ b/requests/backgroud.js @@ -0,0 +1,8 @@ +function logURL(requestDetails) { + console.log("Loading: " + requestDetails.url); +} + +browser.webRequest.onBeforeRequest.addListener( + logURL, + {urls: [""]} +); diff --git a/requests/manifest.json b/requests/manifest.json new file mode 100644 index 0000000..c424e34 --- /dev/null +++ b/requests/manifest.json @@ -0,0 +1,15 @@ +{ + "description": "Demonstrating webRequests", + "manifest_version": 2, + "name": "webRequest-demo", + "version": "1.0", + + "permissions": [ + "webRequest", + "" + ], + + "background": { + "scripts": ["background.js"] + } +}