From e7979f893c1232e592c49de2ba1ea2a6caf143a2 Mon Sep 17 00:00:00 2001 From: flying-scorpio Date: Sun, 5 Jan 2020 10:03:43 +0100 Subject: [PATCH] Add files for Mozilla API --- requests/backgroud.js | 8 ++++++++ requests/manifest.json | 15 +++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 requests/backgroud.js create mode 100644 requests/manifest.json 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"] + } +}