如何链接到 Chrome 扩展程序(例如 Chrome 网上应用店)?

发布于 2024-12-12 06:15:13 字数 458 浏览 0 评论 0原文

我想在自己的网站上自行托管 Chrome 扩展程序,但希望安装体验与 Chrome 网上商店相同。具体来说,我想要一个“添加到 chrome”按钮,要求用户再单击一次即可安装扩展程序。目前,在自托管扩展上,您必须确认下载,然后确认安装。

以下是网上商店的示例:https://chrome.google.com/webstore/detail/olnconaknblgbkfgknkfmmfhhbebkekd

我想自行托管的唯一原因是这样他们就可以留下来安装扩展程序时我的网站。

如果这有助于体验(即从我的网站到 chrome 网上商店的特殊链接,可以立即开始下载),我也可以在 chrome 网上商店托管。

有什么想法吗?

I'd like to self host a chrome extension on my own site but would like the install experience to be the same as on the chrome web store. Specifically, I'd like to have a "add to chrome" button which asks the user to install the extension with one more click. Currently on self hosted extensions you have to confirm the download and then confirm the install.

Here's an example of the web store: https://chrome.google.com/webstore/detail/olnconaknblgbkfgknkfmmfhhbebkekd

The only reason I'd like to self host is so that they can stay on my site while installing the extension.

I'd be perfectly fine hosting on the chrome webstore as well if that helped with the experience (i.e. a special link from my site to the chrome webstore that would start the download immediately).

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

丢了幸福的猪 2024-12-19 06:15:13

Chrome网上应用店有特殊处理,你无法复制它。

为了省去您自行托管的麻烦,您可以提供一个直接链接到网上商店托管的 crx 文件,其格式如下:

http://clients2.google.com/service/update2/crx?response=redirect&x=id%3D<EXTENSION_ID_HERE>%26uc%26lang%3Den-US&prod=chrome

用户仍然需要确认 2 次,但至少您不必托管它,用户也不会'不要离开你的网站。

更新

刚刚发布到稳定分支的 Chrome 15 具有内联安装,这似乎正是您正在寻找的。

Chrome webstore has special treatment, you can't reproduce it.

To save you trouble of self hosting, you can provide a direct link to crx file hosted on webstore which has the following format:

http://clients2.google.com/service/update2/crx?response=redirect&x=id%3D<EXTENSION_ID_HERE>%26uc%26lang%3Den-US&prod=chrome

Users would still need to confirm 2 times, but at least you don't have to host it and users won't leave your site.

UPDATE

Chrome 15, that was just released into stable branch, has Inline Installation, which seems like exactly what you are looking for.

我不会写诗 2024-12-19 06:15:13

Chrome 现在具有内联安装功能,可以在您的网站上一键安装,但可以从商店下载。

如需了解更多详情,请参阅此处

Chrome now has inline install that enables a one-click install on your site but downloading from the store.

See here for more details.

捂风挽笑 2024-12-19 06:15:13

将类似的内容添加到您的元数据中将

<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/you-chrome-id">

其添加到任何位置:

onclick="javascript:chrome.webstore.install()"

Add something like this to your meta-data

<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/you-chrome-id">

Add this any where:

onclick="javascript:chrome.webstore.install()"
喜爱纠缠 2024-12-19 06:15:13

Chrome 不再支持扩展程序的内联安装。

https://developer.chrome.com/extensions/inline_faq

当您的网站调用 chrome.webstore.install() 时,Chrome 将不再立即触发对话框,而是会在 Chrome 网上应用店的详细信息页面中打开一个新的前台选项卡

Chrome no longer supports in-line installation of extensions.

https://developer.chrome.com/extensions/inline_faq

When your site calls chrome.webstore.install(), Chrome will no longer trigger a dialog immediately but will instead open a new foreground tab to the details page of the Chrome WebStore

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文