I am currently building a chrome extension. I want to access the preview tab of network section in devtools using the extension. I am using chrome.webRequest API.
However I am unable to find any information for the same. Here is my code:
manifest.json
{
"manifest_version": 3,
"name": "Test",
"version": "1.0",
"description": "Read js scripts",
"icons": {
"16": "images/globe.ico"
},
"background": {
"service_worker": "content.js"
},
"permissions": [
"webRequest"
],
"host_permissions": [
"https://www.google.com/*"
]
}
content.js
chrome.webRequest.onHeadersReceived.addListener(
function(details) {
console.log(details);
},
{urls: ["<all_urls>"],types: ["script"]},
["extraHeaders", "responseHeaders"],
);
All that i get is this
Any help would be appreciated.