Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox - how do I list installed extensions and identify them in a list?

Two related questions:

  1. Is there an API to produce a list of all the installed extensions in Firefox?

  2. 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!

like image 330
DVK Avatar asked Jan 13 '10 04:01

DVK


2 Answers

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) })
like image 122
Nickolay Avatar answered Oct 07 '22 15:10

Nickolay


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.

like image 40
YOU Avatar answered Oct 07 '22 15:10

YOU