TODO: 1. server request url. get response

This commit is contained in:
eson 2020-11-16 01:47:34 +08:00
parent 4aa063ff68
commit e4923eaf8d
3 changed files with 26 additions and 3 deletions

View File

@ -0,0 +1,22 @@
chrome.webRequest.onCompleted.addListener(
function (details) {
console.log(details);
console.log(document);
// return { responseHeaders: details.responseHeaders};
},
{
urls: ["<all_urls>"],
types: [
"main_frame",
"sub_frame",
"stylesheet",
"script",
"image",
"object",
"xmlhttprequest",
"other"
]
},
["responseHeaders", "extraHeaders"]
);

View File

@ -0,0 +1 @@

View File

@ -1,6 +1,6 @@
{ {
"background": { "background": {
"js": [ "scripts": [
"background/worker.js" "background/worker.js"
] ]
}, },
@ -16,7 +16,7 @@
"content_scripts": [ { "content_scripts": [ {
"all_frames": true, "all_frames": true,
"js": [ "content/inject.js" ], "js": [ "content/inject.js" ],
"matches": [ "*://*/*" ], "matches": [ "<all_urls>" ],
"run_at": "document_start" "run_at": "document_start"
} ], } ],
"description": "block all", "description": "block all",
@ -31,7 +31,7 @@
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlurgt0Ykv740tjk1ebeiSX6UVVRRhxVvh+FvRMTe9PKzkAKUDEW2IjNUz1swxZA8ILnMvtyamAfiErTOxUFB8+zCADU/CK2YEhqUJo3tmHCg6EP2XJL220ZXjmIeft1AqJV1BmGRLhm8VnH8dJ2EThfcflx4JEdlh0/aLJr6UVjF2hPVX8JLAMTVjEfiC82KDNGgXDADqBm3E/6n+Dx+3KhgIYTXKIMk+qRVaOhjAJLh8a9OrDBwpylP5RDifTAyVVa9UOyoLNqynzC9oLabWUr1ovWAOiivhYknFCXnl5q971iNSFpmjc+ZW+aK+TRjMnJF84IeA170corVG3KgnwIDAQAB", "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlurgt0Ykv740tjk1ebeiSX6UVVRRhxVvh+FvRMTe9PKzkAKUDEW2IjNUz1swxZA8ILnMvtyamAfiErTOxUFB8+zCADU/CK2YEhqUJo3tmHCg6EP2XJL220ZXjmIeft1AqJV1BmGRLhm8VnH8dJ2EThfcflx4JEdlh0/aLJr6UVjF2hPVX8JLAMTVjEfiC82KDNGgXDADqBm3E/6n+Dx+3KhgIYTXKIMk+qRVaOhjAJLh8a9OrDBwpylP5RDifTAyVVa9UOyoLNqynzC9oLabWUr1ovWAOiivhYknFCXnl5q971iNSFpmjc+ZW+aK+TRjMnJF84IeA170corVG3KgnwIDAQAB",
"manifest_version": 2, "manifest_version": 2,
"name": "MyBlock", "name": "MyBlock",
"permissions": [ "storage", "*://*/*", "activeTab", "webRequest", "webRequestBlocking","webNavigation", "tabs"], "permissions": [ "storage","tabs" , "activeTab", "webRequest", "webRequestBlocking", "<all_urls>", "webNavigation"],
"short_name": "myblock", "short_name": "myblock",
"version": "0.1.0" "version": "0.1.0"
} }