~robcee/ more than just sandwiches

Posted
26 November 2010 @ 7pm

Tagged
Addons, Code, Firefox, Mozilla, Programming

Bookmarks Deiconizer, a Firefox Addon

It’s Black Friday! For some of you, that means lots of shopping, post-turkey discomfort and watching football. Maybe all at once. For me, it meant checking out the latest development trunk of the Add-ons SDK (née Jetpack) and bundling up an add-on.

There were a couple of fun things about doing this. One, all of the UI inspection was done with the built-in Inspector in Firefox. If you load up chrome://browser/content/browser.xul in a tab and invoke the inspector (after setting devtools.inspector.enabled to true in about:config and restarting), you can look at the various parts of the browser chrome.

To make the toolbar visible, you’ll probably have to select “View Bookmarks” from the bookmarks toolbar dropdown next to the search box in the UI. Even if it’s on, you’ll probably have to toggle it off and on again to get the bookmarks to show up.

bookmarks toolbar button

Deselect the View Bookmarks Toolbar menu option and then re-enable it.

Once that’s done, open the Inspector (Cmd-Shift-I or from the Tools menu on a mac, Ctrl-Shift-I or the Web Developer submenu in the app menu on PC) and hover over the bookmarks toolbar in the browser.  Ultimately, you’ll want to highlight the toolbar element with id “PersonalToolbar” and take a look at its attributes. You’ll see that the mode attribute is set to “icons” by default.

Now for the magical part: Open the Web Console on this page (Cmd/Ctrl-shift-K). In the JS Input line, type:

$(“PersonalToolbar”).setAttribute(“mode”, “text”);

and hit Enter. The icons should disappear from the embedded browser document.

And that’s pretty much all there is to this addon. Check out the source on github or in hg, view some minimal documentation, and, when it gets approved, install it from AMO.


5 Comments

Posted by
Remove Icons From Firefox’s Bookmarks Toolbar
26 November 2010 @ 8pm

[...] Another good thing about this add-on: It does not require restart to install (or, disable/uninstall). Install  bookmarks-deiconizer from AMO, and read more @ Rob Campbell’s blog. [...]


[...] View post: ~robcee/ – Bookmarks Deiconizer, a Firefox Addon [...]


Posted by
Gilles
9 January 2011 @ 8am

Thnaks for it, make the bookmarks bar much more enjoyable. One little thing: on Firefox 4b8, at least, on a Mac, bookmarks-deiconizer hides the arrows to reveal the bookmarks not fitting the bar.


Posted by
robcee
9 January 2011 @ 12pm

Thanks for the comment and bug report, Gilles. I’ll see if I can figure out what’s happening there and release a fix.


Posted by
Phil
25 March 2011 @ 7am

This tool is great, except for one bug: It removes also the double-arrows at the far right, which is needed to access more bookmarks.