Chrome extension API to manipulate other installed Chrome extensions?
-
21-09-2019 - |
문제
I'm writing a Google Chrome extension that needs to do a lot of things with other extensions, such as:
- List 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).
해결책 2
Chromium developer Brian Kennish states here suggests writing an NPAPI plugin as the most rational option to achieve the desired effect.
다른 팁
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)
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.