I am trying to work out how to best implement direct firefox-addon installation from my website. Besides simply prompting the user to install the addon, I would also want to get the result of the user action (accepts installation or cancels it).
Research on google generally points to the use of InstallTrigger.install()
, which works fine except that there is no functional callback that I can use to know the result of the user's action.
Though InstallTrigger.install()
does accept a callback, the callback is not fired unless the current viewing page is a whitelisted domain (e.g. AMO):
https://developer.mozilla.org/en-US/docs/Archive/Mozilla/XPInstall/Reference/InstallTrigger_Object/Methods/install
So I am wondering:
Thanks a lot!
With Firefox open, hit Ctrl+ o (or Cmd+ o) > browse to the extension > double click the extension (or select Open) > Install Now. Method: Press Alt + f > o > browse to the extension > double click the extension (or select Open) > Install Now.
To install these offline: Firefox: To install an extension manually, download the XPI file, then open Firefox and select 'Add-ons' from the menu. Drag and drop the downloaded file onto the list of currently available extensions. Click 'Install', then restart your browser when prompted to activate the extension.
It will take you to addons.mozilla.org where you can search for specific add-ons. in the upper-right area of the Add-on Manager Extensions panel. Select Install Add-on from file... from the menu, then find and select the file. Some extensions place a button in the toolbar after installation.
With inline installation, you can allow Chrome users who visit your web site to install your apps and extensions directly without requiring them to visit the Chrome Web Store. This creates a smoother experience for your users as it eliminates an extra step where potential users could drop off.
Just to get this question off the Unanswered list.
The XPInstall whitelist only contains Mozilla's sites, so Mozilla doesn't seem to have a way to accept a domain into their default addon installation whitelist.
The browser itself will not notify the untrusted web page about the results of the add-on installation. If your extension is restartless, it can notify the page it has been installed via postMessage
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With