如何通过命令行开关指定Chrome本机消息传递主机的路径?

时间:2019-12-29 20:48:50

标签: google-chrome-extension chrome-native-messaging

当我没有为应用程序指定“ -s”开关时,下面的JSON文件效果很好。可以在JSON文件中指定命令行开关吗?

{
  "name": "com.mycompany.chrome.hide",
  "description": "Chrome Native Messaging Host for Chrome Hide",
  "path": "chrome-hide.exe -s",
  "type": "stdio",
  "allowed_origins": [
  "chrome-extension://jbhffgnkfigfgfgjaifeghdgfihalgi/"
  ]
}

无论有没有开关,可执行文件本身在命令行上都能正常工作。只是当我通过本地消息传递界面从Chrome内部触发时,我要静默运行此程序。

0 个答案:

没有答案