我有一个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修复了