Domanda

I am installing Firefox (XPI) and Google Chrome (CRX) add-ons via an installer. I have setup the installer to create the following registry entries,

HKEY_LOCAL_MACHINE\Software\Google\Chrome\Extensions\extension's ID\ - "path", "version"

HKEY_LOCAL_MACHINE\Software\Mozilla\Firefox\Extensions\ - "extension's ID"

Once the browsers are opened after this, the extensions are detected and installed, I mean when the browsers see that these registry entries exists, it adds the extensions to its' lists.

This is OK. However, when the Firefox is opened it asks the user that there is a new extension and asks the user to enable it. At this point the user has to enable it. Asking part is OK but is there way to make it auto enabled on first install?

On Google Chrome it is installed and not enabled as Firefox. But unlike Firefox it never shows a message that there is a new extension. So is there a way to either notify the user (like Firefox) to enable it or auto enable it (although, it seems that after Google Chrome version 25 it will not enable the extension)? At least ask the user?

È stato utile?

Soluzione

I cannot really comment on Chrome, so I'll just quote them.

Extensions installed by third party programs using external extension deployment options will be disabled by default. When a third party program installs an extension, the Chrome menu will be badged, and users can click through the Chrome menu to see a dialog containing an option to enable the extension or to remove it from their computer. (Source: http://blog.chromium.org/2012/12/no-more-silent-extension-installs.html)

Not sure if the "badge" bits are still the case, though, considering this post is from 2012 and IIRC there are plans to outright disable all non-webstore installs at some point.

Regarding Firefox: No, there is no supported way of doing silent or auto-enabled add-on installs in Firefox. In fact, attempting to circumvent the opt-in dialog violates the Add-on Guidelines and can get your add-on blocklisted, even if your add-on was never listed on the official add-ons site.

Regarding @Noitidart's comment:

I also don't know how to do silent install but this guy says in a comment that addon sdk does it silenty, so check it out: https://ask.mozilla.org/question/301/open-firefox-profile-with-nsiprocess-and-access-it-via-privealaged-scope/?answer=311#post-id-311

Well, the cfx run command of the SDK overwrites some preferences in the Firefox profile (it usually creates) to have the add-on auto-enabled. This is OK for development stuff, but is not OK if you push your add-on to unsuspecting end-users and therefore is a blocklist-able offense.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top