用于调用外部应用程序的NPAPI替换(本机消息传递主机)无法工作

NPAPI replacement (Native messaging host) for invoking external application not working

本文关键字:主机 消息传递 工作 本机 外部 调用 应用程序 替换 NPAPI 用于      更新时间:2023-09-26

我有一个Firebreath插件,它为我做了同样的事情,但由于它的支持在chrome中被删除,我必须寻找替代方案。在查看了备选方案之后,本机消息传递主机看起来是我的最佳选择。我创建了下面的com.mycompany.testapp.json

{
  "name": "com.mycompany.testapp",
  "description": "My test app",
  "path": "/usr/bin/testapp",
  "type": "stdio",
  "allowed_origins": [
    "chrome-extension://jhvgchjavcjhspehlmfjbhpllakficickbkk/"
  ]
}

复制到目录:

/home/abc/.config/google-chrome/NativeMessagingHosts/com.mycompany.testapp.json 

实际上,Ubuntu上的Chrome 33不会查看/home/abc/。. config/google-chrome/native - essaginghosts/将json放入/etc/opt/chrome/native-messaging-hosts修复了