Chrome Extension Inline install procedure

我们两清 提交于 2019-12-31 03:54:07

问题


UPDATE: Google has disabled inline installation feature for Chrome extensions.

<link rel="chrome-webstore-item" href="chrome.google.com/webstore/detail/itemID">

I have added above code on my html page (my website hit by user) which is associated with my chrome extension already published in chrome store and javascript function chrome.webstore.install().

Will it really make user to install the chrome extension in his computer?


回答1:


The documentation: https://developer.chrome.com/webstore/inline_installation

First off, for this to work, you will need to verify the website as something you own via Webmaster Tools.

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).

Once you verified your site, you need to edit your extension listing via Developer Console to select that the extension is associated with your (verified) site:


If you have done all that, added the link tag and triggered the install() function (which, if I remember correctly, has to be triggered by a user action, like a click handler), the user will be presented with a small dialog describing your extension, something like that:

There, they can accept or deny without opening Web Store. You cannot silently install an extension, but you can save the user the trouble of going to the Store listing.



来源:https://stackoverflow.com/questions/29818685/chrome-extension-inline-install-procedure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!