Add files for Mozilla API
This commit is contained in:
parent
37886f4da4
commit
e7979f893c
2 changed files with 23 additions and 0 deletions
8
requests/backgroud.js
Normal file
8
requests/backgroud.js
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
function logURL(requestDetails) {
|
||||||
|
console.log("Loading: " + requestDetails.url);
|
||||||
|
}
|
||||||
|
|
||||||
|
browser.webRequest.onBeforeRequest.addListener(
|
||||||
|
logURL,
|
||||||
|
{urls: ["<all_urls>"]}
|
||||||
|
);
|
15
requests/manifest.json
Normal file
15
requests/manifest.json
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"description": "Demonstrating webRequests",
|
||||||
|
"manifest_version": 2,
|
||||||
|
"name": "webRequest-demo",
|
||||||
|
"version": "1.0",
|
||||||
|
|
||||||
|
"permissions": [
|
||||||
|
"webRequest",
|
||||||
|
"<all_urls>"
|
||||||
|
],
|
||||||
|
|
||||||
|
"background": {
|
||||||
|
"scripts": ["background.js"]
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue