Page 1 of 24

Addon Manager List Generator

PostPosted: Sun Apr 01, 2012 2:36 am
by srazzano
Image Addon List Gen
Updated: August 13, 2013

Generates a selectable/editable category view of all extensions, plugins, themes, scripts and userstyles for copying to clipboard or generating a time stamped text file to preclude the overwriting of files. Changes button icon on the fly and displays pertinent data information in the header.


Re: Addon Manager List Generator

PostPosted: Sun Apr 01, 2012 3:53 pm
by makondo

srazzano, i think it might be good to add the total/enabled/disabled count line (the one from the AM ext.).

And also, if possible, make the button generate a combined list when clicked despite AM being open or not. Maybe use Mclick for that (if it's at all possible, of course).
So, to sum it up:

Lclick - nothing happens if AM is not opened (it's good 'cause who wants a list generated by a mistaken Lclick anyway? it will remind to open AM or Mclick)
Lclick when AM is opened - generates a list for the selected category
Mclick - generates a combined list of all addons, total/disabled/enabled count, UA regardles of AM being open or not
Rclick - opens AM

What do you think?

Re: Addon Manager List Generator

PostPosted: Sun Apr 01, 2012 10:25 pm
by mrbunnylamakins
Hmm I never thought of copying it to text. Might be nice record in case you need to check it.

Extension List | custombuttons

Re: Addon Manager List Generator

PostPosted: Mon Apr 02, 2012 2:26 am
by makondo
The brilliance of this button is that it generates list of whatever category tab you're viewing in AM. That is, if you're in Styles category, it will create a list of your styles, etc. Maybe the older buttons will save srazzano time and help to make it work w/out AM being open, like i posted in my request above. If he'll be willing, of course.

Oh, another thing i remembered about LI was it was possible to set it so that it would include links to those exts. when links were available (i'd imagine most are on AMO).
srazzano, do you think you can do this? BTW, i have the latest Local Install xpi, i can send it to you if you'd like to take a look or else get it here.

Re: Addon Manager List Generator

PostPosted: Mon Apr 02, 2012 8:57 pm
by morat
Here is a similar button I wrote a while back that opens all addon types in new tabs.

Code: Select all
function caseInsensitive(a, b) {
  a = a.toLowerCase();
  b = b.toLowerCase();
  if (a < b) return -1;
  if (a > b) return 1;
  return 0;
function openTab(aType) {
  AddonManager.getAddonsByTypes([aType], function(aAddons) {
    var list = new Array();
    aAddons.forEach(function(aAddon) {
    // if (list.length == 0) return;
    var out = new Array();
    for (var i = 0; i < list.length; i++) {
      out.push("* " + list[i].name + " " + list[i].version);
    out.unshift(aType.toUpperCase() + " (" + list.length + ")", "");
    out.unshift( + " " + appInfo.version + " Gecko " + appInfo.platformVersion, "");
    var converter = Components.classes[""].
    converter.charset = "UTF-8";
    for (var i = 0; i < out.length; i++) {
      out[i] = converter.ConvertFromUnicode(out[i]);
      out[i] = out[i].replace(/&/g, "&amp;");
      out[i] = out[i].replace(/>/g, "&gt;");
      out[i] = out[i].replace(/</g, "&lt;");
      out[i] = out[i].replace(/"/g, "&quot;");
      out[i] = out[i].replace(/'/g, "&apos;");
    var data = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">';
    data += "<html><head><title>" + aType + "</title>";
    data += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
    data += "</head><body><pre>" + out.join("\n") + "</pre></body></html>";
    if ( == "Firefox" || == "SeaMonkey") {
      gBrowser.addTab("data:text/html;charset=utf-8;base64," + btoa(data));
    if ( == "Thunderbird") {
      var tabmail = document.getElementById("tabmail");
      if (!tabmail) {
        var win = Components.classes[";1"].
        if (win) {
          tabmail = win.document.getElementById("tabmail");
      if (tabmail) {
        tabmail.openTab("contentTab", {
          contentPage: "data:text/html;charset=utf-8;base64," + btoa(data),
          background: true});
var appInfo = Components.classes[";1"].
// ["extension", "theme", "plugin"].forEach(openTab);
for (var type in AddonManager.addonTypes) openTab(type);


I would replace the "\u2003" characters before the copy to clipboard operation. I would also select or open the addons tab if the current tab is not the addons tab.

Code: Select all
var appInfo = Components.classes[";1"].
if ( == "Firefox" || == "SeaMonkey") {
  for (var i = 0, addTab = true; i < gBrowser.tabContainer.childNodes.length; i++) {
    if (gBrowser.tabContainer.childNodes[i].linkedBrowser.currentURI.spec == "about:addons") {
      gBrowser.selectedTab = gBrowser.tabContainer.childNodes[i];
      addTab = false;
  if (addTab) gBrowser.selectedTab = gBrowser.addTab("about:addons");
if ( == "Thunderbird") openContentTab("about:addons");


Try the version by Anton. ... 46#p488446

Re: Addon Manager List Generator

PostPosted: Mon Apr 02, 2012 10:18 pm
by makondo
Thanks, i know (and have it saved locally) another button like this but i don't need it. I use Extension Options Menu ext. which opens AM on Rclick. Just thought it'd be logical to have the option (Rclick>AM) in this button as well (not for me necessarily but for those who don't have other AM exts./buttons, for instance).

Re: Addon Manager List Generator

PostPosted: Tue Apr 03, 2012 12:34 am
by srazzano
Updated button so on left click will switch to the Addon Manager and load the list. If Addon Manager not opened, will open a new tab to display it and another left click to load the list. Did not want it on right click because of the needed context menu.
Thanks morat for the info and eliminated the \u2003 and \u2007 from copy function.

Re: Addon Manager List Generator

PostPosted: Tue Apr 03, 2012 1:01 am
by makondo
CB had context menus on Shift+ click which allowed using Rclick for clicks.
After the first Lclick, the AM opened focused and an empty (i think) frame of the list flashed for a second and disappeared.
So, is there a way to make a list of all addons, not categorized?

Thanks for the update!

EDIT: i asked that before in us.o thread. why the list box looks like my style for buttons? I can't seem to style it. This doesn't seem to have any effect:

{ background: rgba(150,150,150, .6) !important;
font-weight: bold !important;
color: black !important;
text-shadow: 0px 0px 6px #999 !important; }

Re: Addon Manager List Generator

PostPosted: Tue Apr 03, 2012 2:52 am
by srazzano
OK, updated button again. When I overhauled the code, did not convert the #textbox to #listBox. It is now #listBox so your code above will work. Also added code so you can apply your code (normal css format) into the "Help" tab while in the button edit mode.

Re: Addon Manager List Generator

PostPosted: Tue Apr 03, 2012 3:41 am
by mrbunnylamakins
ok it needs some more revision I Clicked the button and blank page opened with prompt "The URL is not valid and cannot be loaded." I click Ok ,then the list open blanks showing nothing.