Chrome 扩展内联安装程序
Chrome Extension Inline install procedure
更新: Google 已禁用 Chrome 扩展的内联安装功能。
<link rel="chrome-webstore-item" href="chrome.google.com/webstore/detail/itemID">
我在我的 html 页面(我的网站被用户点击)上添加了上面的代码,它与我的 chrome 扩展相关联,已经在 chrome 商店和 javascript 函数 chrome.webstore.install()
.
它真的会让用户在他的计算机上安装 chrome 扩展吗?
文档:https://developer.chrome.com/webstore/inline_installation
首先,要使其正常运行,您需要通过网站站长工具验证该网站是否属于您。
Verified site requirement
For security reasons, inline installations can only be initiated by a page on a site that is verified (via Webmaster Tools) as being associated with that item in the Chrome Web Store. Note that if you verify ownership for a domain (for example, http://example.com) you can initiate inline installation from any subdomain or page (for example, http://app.example.com or http://example.com/page.html).
一旦您验证了您的站点,您需要通过开发者控制台编辑您的扩展程序列表,以select该扩展程序与您的(已验证)站点相关联:
如果您已完成所有操作,请添加 link 标记并触发 install()
函数(如果我没记错的话,它必须由用户操作触发,例如点击处理程序),用户将看到一个描述您的扩展程序的小对话框,类似于:
在那里,他们可以在不打开网上应用店的情况下接受或拒绝。您不能静默安装扩展程序,但可以省去用户访问应用商店列表的麻烦。
更新: Google 已禁用 Chrome 扩展的内联安装功能。
<link rel="chrome-webstore-item" href="chrome.google.com/webstore/detail/itemID">
我在我的 html 页面(我的网站被用户点击)上添加了上面的代码,它与我的 chrome 扩展相关联,已经在 chrome 商店和 javascript 函数 chrome.webstore.install()
.
它真的会让用户在他的计算机上安装 chrome 扩展吗?
文档:https://developer.chrome.com/webstore/inline_installation
首先,要使其正常运行,您需要通过网站站长工具验证该网站是否属于您。
Verified site requirement
For security reasons, inline installations can only be initiated by a page on a site that is verified (via Webmaster Tools) as being associated with that item in the Chrome Web Store. Note that if you verify ownership for a domain (for example, http://example.com) you can initiate inline installation from any subdomain or page (for example, http://app.example.com or http://example.com/page.html).
一旦您验证了您的站点,您需要通过开发者控制台编辑您的扩展程序列表,以select该扩展程序与您的(已验证)站点相关联:
如果您已完成所有操作,请添加 link 标记并触发 install()
函数(如果我没记错的话,它必须由用户操作触发,例如点击处理程序),用户将看到一个描述您的扩展程序的小对话框,类似于:
在那里,他们可以在不打开网上应用店的情况下接受或拒绝。您不能静默安装扩展程序,但可以省去用户访问应用商店列表的麻烦。