How to get preview tab from chrome.webRequest

26 Views Asked by At

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.

preview tab

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

console.log

Any help would be appreciated.

0

There are 0 best solutions below