从 Mac 应用安装 Chrome 扩展

Install Chrome Extension from Mac App

想在安装 mac 应用程序时安装 chrome 扩展程序。 我遵循了 chrome Other Deployment Options

开发者网站上的说明

两种方法都试过了

  1. 本地文件url

在路径 /Users/Sadiq/Library/Application 处创建了文件 external_extensions.json Support/Google/Chrome/External 包含内容的扩展名

 {
"external_crx": "/home/share/extension.crx",
"external_version": "1.0"
 }

但是当我重新启动 chrome 时,该路径的扩展没有安装在 chrome。

  1. 商店安装:

已创建文件 fhbjgbiflinjbdggehcddcbncdddomop.json 在路径 /Users/Sadiq/Library/Application Support/Google/Chrome/External 扩展

有内容

{
 "fhbjgbiflinjbdggehcddcbncdddomop": {
 "external_update_url": "http://test.com/extension_info.xml"
 }
}

使用以下代码在托管处创建了 extension_info.xml 文件

 <?xml version='1.0' encoding='UTF-8'?>
 <gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
 <app appid='fhbjgbiflinjbdggehcddcbncdddomop'>
 <updatecheck     codebase='https://clients2.googleusercontent.com/crx/blobs/QgAAAC6zw0qH2D    JtnXe8Z7rUJP0d-cjv-    4fr0OfD1rZlXmwxm1zzQqbU1RRtbPRUspFh5VJIFInV7jQnzNI5Ax7-tVFFNKUqiQdoiA-    43Tdd46i1AMZSmuUS-XRXhbdPB5d5cMLUhLCthCuF7g/extension_1_0_0_26.crx'     version='1.0.0.26' />
 </app>
 </gupdate>

但是当我重新启动 chrome 时,它必须安装 manefest 文件中给出的扩展。第一次它可以工作,但是当我卸载扩展并重新启动浏览器时,它不会再次安装它。没有完成其他更改

我想在我的 mac 应用安装中安装 firefox 扩展。

谢谢

萨迪克

At first time it works but when i uninstall the extension and relaunch the browser it doesn't install it again.

这是故意的。当用户卸载以编程方式安装的扩展程序时,它会列入黑名单并且不会再次触发安装。

用户仍然可以从商店手动安装它,但如果被拒绝,您将无能为力。