Two related questions:
Is there an API to produce a list of all the installed extensions in Firefox?
If so, how would I uniquely identify an extension? What I need is to have an ID that persists through different versions of an extension and ideally through a renaming (so name may not be the best option). Is it GUID?
Thanks!
Note: this answer is outdated. nsIExtensionManager was replaced by AddonManager
, and FUEL is deprecated.
You can get the list of items from nsIExtensionManager. Yes there is a unique ID for extensions (nsIUpdateItem::id
), as specified in the install manifest.
On a second thought, this is where FUEL is really useful. Try this in the Error Console:
Application.extensions.all.forEach(function(item) { alert(item.id) })
To get extensions list, Please take a look at nsExtensionManager.js
in components folder,
there is a variable called validExtensions
which use to generate extensions.ini
in firefox profile directory
For unique ID, I guess its depend on extensions itself, because some extensions like noscript, adblockplus use GUID, and some extensions like firebug,foxmarks using email address style.
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