开发者

Chrome extension API to manipulate other installed Chrome extensions?

开发者 https://www.devze.com 2022-12-15 04:40 出处:网络
I\'m writing a Google Chrome extension that needs to do a lot of things with other extensions, such as:

I'm writing a Google Chrome extension that needs to do a lot of things with other extensions, such as:

  • Lis开发者_如何转开发t installed extensions and read their IDs
  • Request extension installation, update and removal (preferably without bothering the user)
  • Modify extension settings

and so on. Which of these are possible, and which are not (due to e.g. security considerations)?

P.S. I haven't been able to find answers in the inter-extension messaging section of the official docs (or anywhere else, actually).


You can do most of those things today with chrome.management API. For example:

Get a list of information about installed extensions and apps:

chrome.management.getAll(function callback)

Uninstall a currently installed app or extension:

chrome.management.uninstall(string id, object options, function callback)


Chromium developer Brian Kennish states here suggests writing an NPAPI plugin as the most rational option to achieve the desired effect.


This is not directly possible via the extension API. To be honest, I wouldn't recommend using NPAPI for this either since you'd have to modify files which are in-use by the browser, which is unreliable at best.

0

精彩评论

暂无评论...
验证码 换一张
取 消