google chrome - get URL of network requests displayed by the Developer Tools in the Network panel -
i’d url of network requests displayed developer tools in network panel match pattern (e.g. ends .aac)in chrome extension. seems can utilize chrome.devtools.network api accomplish it, way seems requires developer tools window open extension work, not convenient !!!
is there way fulfill task ?
two possibilities.
first, , easier, can employ webrequest
api, , hear onbeforerequest
event:
chrome.webrequest.onbeforerequest.addlistener( function(details) { console.log(details.url); }, {urls: ["*://*/*.aac"]} );
second, if need exactly same info presented dev tools, there chrome.debugger
api, allows attach tab in place of dev tools using debugger protocol.
it's harder, debugger protocol documentation not easy find , read. also, caveat: 1 tool can utilize debugger protocol, if open dev tools, chrome.debugger
disconnected.
google-chrome google-chrome-extension google-chrome-devtools google-chrome-app
No comments:
Post a Comment