简体   繁体   中英

Chrome Extension installation

I have chrome extension which get installed with using installer which install some process and browser extensions. As per chrome security changes stand alone installation will be blocked. Google to block local Chrome extensions

If we host extension on chrome store what are the ways we can redirect chrome from installer to install extension.

According to the Chromium Blog :

If your extensions are currently hosted outside the Chrome Web Store you should migrate them as soon as possible. There will be no impact to your users, who will still be able to use your extension as if nothing changed. You could keep the extensions hidden from the Web Store listings if you like. And if you have a dedicated installation flow from your own website, you can make use of the existing inline installs feature.

So, basically, what you need to do is:

  1. Host your extension on the Chrome Web Store (optionaly keeping it hidden from the listings).
  2. Have your installer open a Chrome browser window pointing to a webpage on your site.
  3. On that page have all necessary info and data for the user to initiate the extention's installation process. (The key concept here is that the user has to initiate the installation process, eg by clicking a button.

How does inline installation work:

The HTML page on your site from which you want inline installation to occur must contain one or more tags in the section referencing the items that the user can install. Each tag must have the following format:

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

To actually begin inline installation, the chrome.webstore.install(url, successCallback, failureCallback) function must be called. This function can only be called in response to a user gesture , for example within a click event handler; an exception will be thrown if it is not.

(emphasis mine)

More info on the inline installs feature .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM