I'm currecntly working on a chrome extension and I need to access requests in network tab. Found the API called devtools.network. Tried to use it, but It threw an error like this:
content.js:1 Uncaught TypeError: Cannot read properties of undefined (reading 'network')
at content.js:1
content.js:
chrome.devtools.network.onRequestFinished.addListener(function(request){
console.log(request)
})
manifest.json:
{
"name": "Managebac Grade Calculator",
"version": "1.2",
"manifest_version": 2,
"content_scripts": [
{
"matches": [
"https://opengate.managebac.com/student/*"
],
"js": [
"jquery.js",
"content.js"
]
}
],
"devtools_page": "devtools.html",
"permissions":[
"network"
],
"icons": {
"16": "pfp.jpg",
"48": "pfp.jpg",
"128": "pfp.jpg"
},
"browser_action": {
"default_icon": "pfp.jpg",
"default_popup": "popup.html"
}
}
Please help me