Is it possible to create a Chrome Extension for private distribution outside Chrome Web Store?

后端 未结 4 389
花落未央
花落未央 2021-01-30 00:54

We have a Chrome Extension application that we have developed and would like to distribute it only a limited number of internal users.

This would be a private app, but t

4条回答
  •  伪装坚强ぢ
    2021-01-30 01:11

    Yes, you can. You need to create the crx file through the google chrome "Extensions" page (visit: chrome://extensions/ NOTE: You cannot click the link you have to manually copy and paste it, chrome does not allow you to visit the link from href)

    On the Extensions page, check the box "developer mode", choose "pack extension".

    pack extension

    Now you get the following popup. Click "browse" for the Extension root directory and navigate to the folder containing your extension (the folder containing manifest.json).

    pack extension 2

    The first time you do this, ignore private key file. It will generate one for you automatically and save it to the same folder.

    When you release a new version of the extension, use the generated private key file. This way for someone to update the extension, it won't ask for permissions again.


    TO INSTALL

    • To install the extension, just get each user to manually drag the newly created extension crx into the Extensions page (chrome://extensions/).
    • The first time it will ask for permissions just like when installing from the Chrome Web Store.
    • For each new version, as long as you used the same private key file for each new version, users just drag the new version into the Extensions page the same way except they won't be asked for permissions again. It will just update the extension.

    WARNINGS:

    • Beware the way you distribute the extension crx file. When user downloads the extension .crx file in Google Chrome, it will think you're trying to install the extension from that page, and come up a warning "couldn't be installed from this site". You need to make sure that users know to ignore the error, and check their downloads folder for the extension to manually install it.
    • Whenever you download the .crx file, Chrome will give the user a warning saying it might contain a virus. There is no way around this. Even if you zip up the file, Chrome will read the contents and give the same warning. Some users won't install because of this. A workaround is to rename the .crx to something else, like .RENAME_TO_CRX, but this is a hassle and a lot of users either won't want to or won't be able to figure it out.
    • You can't update the extension automatically. It's just not possible because Chrome manually blocked this capability.

    NOTE: Another way would be to release it on the Chrome Store, but only for certain users (not public). Only people with the link could install, OR you could make it only certain people can install and even if you had the link but weren't part of the group, they couldn't view the extension. Only problem here is if you don't want Google to see the extension.

提交回复
热议问题