Created
January 5, 2011 13:58
-
-
Save cou929/766346 to your computer and use it in GitHub Desktop.
Sample code for extension manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Kosei Moriyama <[email protected]> | |
* | |
* Sample code for Firefox Extension. | |
* Get installed extension data using extensionsManager. | |
* List of attributes of extension data (returned value of getItemList()): | |
* http://www.oxymoronical.com/experiments/apidocs/interface/nsIUpdateItem | |
*/ | |
var extensionsManager = Components.classes["@mozilla.org/extensions/manager;1"] | |
.getService(Components.interfaces.nsIExtensionManager); | |
var itemsList = extensionsManager.getItemList(2, {}); | |
for (var i=0; i<itemsList.length; i++) { | |
Application.console.log(itemsList[i].name); // show name of installed extension | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment