0

I'm trying to customize my own chrome://inspect/#devices , I see it uses utils.js and inspect.js and at the same time it uses a global "chrome" object in the original ones, how do I invoke it from my own inspect.js? Right know I just have a local clone:

Clone folder of chrome://inspect/#devices

  • devices.html
  • inspect.js
  • util.js
  • jquery.js

So I load devices.html but is not working, and the first obstacle I have is that global object "chrome" is not available for inspect.js.

I found a somehow related thread Can `chrome.*` extension API's be used inside content scripts?

Community
  • 1
  • 1
R01010010
  • 5,670
  • 11
  • 47
  • 77

1 Answers1

1

chrome://inspect is one of the build-in Chrome pages (all are listed here - chrome://about/). These pages are considered an integral part of the browser and they have access to special actions (via chrome object). Browser will not inject chrome object into the regular pages (such as your copy of the inspect page).

Unfortunately, you won't be able to modify chrome://inspect page (even with an extension as you can't inject scripts into chrome:// pages). However, you might be able to recreate that page in an extension using debugger API.

Konrad Dzwinel
  • 36,825
  • 12
  • 98
  • 105