Closed Leizhenpeng closed 8 months ago
Try the second idea.
Use the manager API to assign shortcut keys to each application and simulate triggering shortcut keys.
https://stackoverflow.com/questions/12868386/google-chrome-extension-programmatically-open-popup
https://docs.google.com/document/d/19WvnWl4GbpahVwfnapKOBAQS-jCsEqun81Ot8_-jTPg/edit
https://stackoverflow.com/questions/10479679/how-can-i-open-my-extensions-pop-up-with-javascript
https://stackoverflow.com/questions/12868386/google-chrome-extension-programmatically-open-popup
-- To sum up, chrome does not support programmatically opening the pop-up interface of other plug-ins.
Direction about '_execute_action' still is impossible.
First of all, we can’t set shortcut keys for other plug-ins. Secondly, I can’t read the set shortcut keys. Thirdly, I can’t simulate triggering after reading them,
Try to use
management.launch App
, error reportedExpected extension is not an application type that can be launched by this API
refer: https://developer.chrome.com/docs/extensions/reference/api/management?hl=zh-cn#method-launchApp