Reputation: 1613
I have created my Google-chrome extension (crx file) but I don't want to upload it on Chrome web store.
Now how can I install this crx file in Google chrome programmatically (using JavaScript or chrome API) ?
I have searched all over the place and the only solution was to upload extension on chrome web store and the use chrome inline_installation.
Is there any other way ? (and I don't want pre-installed-extensions I want to install when user visits my site and click on install button)
Upvotes: 7
Views: 17786
Reputation: 4344
There is a simple way to install locally-hosted Chrome extensions for personal use. I use this method for my own authoring, testing, and use on my machine.
If it is just an extension, you can put all of your files (background, manifest, etc) into a directory on your computer. Then, open Chrome and do the following:
chrome:extensions
in the omnibar.Chrome will install the extension to your machine. No need for the .crx
file. To distribute this to colleagues, you could host the file for download in Dropbox or your Drive account. They would need to follow the same process to install the extension on their machine.
Do note that if you make updates to the extension for stability or other compatibility upgrades, each person with the extension will need to download the updated directory and then update the extension manually.
Upvotes: 1
Reputation: 3645
Here and here are instructions to hosting an installable .crx file on your own server. Basically:
Google Chrome considers a file to be installable if either of the following is true:
- The file has the content type application/x-chrome-extension
- The file suffix is .crx and both of the following are true:
- The file is not served with the HTTP header X-Content-Type-Options: nosniff
- The file is served with one of the following content types:
- empty string
- "text/plain"
- "application/octet-stream"
- "unknown/unknown"
- "application/unknown"
- "*/*"
UPDATE
Chrome no longer allows extensions to be automatically installed from outside the app store. The user must download the .crx
file drag the extension to the chrome://extensions page.
Source
Upvotes: 4