Skip to content

Commit

Permalink
2.1.2 minor version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Campbell committed Feb 9, 2011
1 parent 2d98a6c commit af0a331
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ The Bookmarks Deiconizer addon removes these unsightly abominations from your to

## Changelog ##

**v2.1.2** - revved maxversion

**v2.1.1** - fixed problem not deiconizing on startup.

**v2.1** - fixed multiple windows issue at startup.
Expand Down
16 changes: 5 additions & 11 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@

const {Cc,Ci,Cm,Cr,Cu} = require("chrome");

var jsm = {};

Cu.import("resource://gre/modules/Services.jsm", jsm);

var services = exports.services = jsm.Services;
let windows = require("window").browserWindows;

windowOpenedCallback = function(aSubject, aTopic, aObject) {
if (aTopic != "domwindowopened")
Expand All @@ -58,11 +54,8 @@ deiconizeToolbar = function(aDocument) {
};

exports.main = function (options, callbacks) {
let xulWindows = services.wm.getXULWindowEnumerator(null);

while(xulWindows.hasMoreElements()) {
let recentBrowser = xulWindows.getNext();
let docShell = recentBrowser.QueryInterface(Ci.nsIXULWindow).docShell;
for each (let win = windows) {
let docShell = win.QueryInterface(Ci.nsIXULWindow).docShell;
let containedDocShells = docShell.getDocShellEnumerator(
Ci.nsIDocShellTreeItem.typeChrome,
Ci.nsIDocShell.ENUMERATE_FORWARDS);
Expand All @@ -78,6 +71,7 @@ exports.main = function (options, callbacks) {
deiconizeToolbar(childDoc);
}
}
services.ww.registerNotification(windowOpenedCallback, "domwindowopened", false);

windows.on("open", windowOpenedCallback);
};

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "jid0-TRew4ErAYBTQ3UFPwfAI5aBEvlg",
"description": "Remove icons from Bookmarks Toolbar.",
"author": "Rob Campbell (http://antennasoft.net/robcee) <rob@antennasoft.net>",
"version": "2.1.1",
"version": "2.1.2",
"url": "http://antennasoft.net/robcee/bookmarks-deiconizer/",
"license": "Unlicense"
}

0 comments on commit af0a331

Please sign in to comment.