Free Web Hosting Provider - Web Hosting - E-commerce - High Speed Internet - Free Web Page
Search the Web

Mozilla Site Navigation

This hack is no longer required as of Mozilla 1.1!

Early release candidates of Mozilla included a very cool feature: a site navigation tool bar. With this feature enabled, the browser adds a toolbar with buttons that provide access to the LINK elements in the HTML HEAD.
Recent versions of the Website doctype include these links, so you can navigate through the website using the Mozilla UI:



Unfortunately, the Mozilla folks decided to remove this feature shortly before the 1.0 release. Apparently it had a small but measurable performance impact.

Personally, I could care less about the performance impact; the feature is way too valuable to worry about losing a few percentage points in page loading speed.

Patching Mozilla to Enable Site Navigation
These instructions work for me, on my Linux box. I assume something similar will work on a Windows box or a Mac, but I haven't tried it. You have backups, right? Caveat hacker.

I've installed Mozilla in /usr/local/mozilla; adjust the paths below to reflect the location where you installed it.

Unpack the /usr/local/mozilla/chrome/comm.jar file into some temporary location:

$ cd /tmp
$ mkdir moz
$ cd moz
$ jar xf /usr/local/mozilla/chrome/comm.jar


If you don't have the jar command on your system, get it from one of the Sun Java distributions.

Unpacking the comm.jar file will produce a tree of several hundred files. Edit ./content/navigator/navigator.xul. This is an XML document.

$ emacs -nw /tmp/moz/content/navigator/navigator.xul

About 25 lines down from the top of this file, you'll find a bunch of “xul-overlay” processing instructions. Add the following processing instruction to the end of that group:



Save navigator.xul.

At this point, you've made all the changes that are needed to enable the site navigation toolbar. However, the toolbar is itself defined with XUL, Mozilla's XML User Interface language. I decided to “improve” the site navigation toolbar to work better with DocBook documents. If you want to install my patched toolbar, continue with step 3. If you just want the standard toolbar, skip to step 4.

Download linkToolbarOverlay.xul and copy it into the navigator directory:

$ wget http://nwalsh.com/hacks/mozilla/linkToolbarOverlay.xul
mv linkToolbarOverlay.xul /tmp/moz/content/navigator/


Now all we have to do is install our patched files. First, build a new comm.jar file:

$ cd /tmp/moz
$ jar cf comm.jar content


Next, make a copy of the original jar file and replace it with your new one. Depending on where and how you installed Mozilla, you may need root or administrator privileges to do this.

$ cd /usr/local/mozilla/chrome
$ mv comm.jar comm.jar.ORIG
$ mv /tmp/moz/comm.jar .


Exit and restart Mozilla.

On the View -> Show/Hide menu, you should find a new entry for the Site Navigation Bar. You can enable it always or as needed. Either way, when you visit sites or documents that are using navigation links, you'll get the new toolbar.

This hack was inspired by a thread I found in the Mozilla newsgroups.


Useful pages. Mozilla tutorials. Manuals, help and tips Mozilla Site Navigation

Related links:

  • mozilla.org - home of mozilla, firefox, thunderbird, and camino
  • Useful pages. Mozilla tutorials. Manuals, help and tips
  • The tips for Mozilla internet users
  • 10 MB of free space Hosting
  • mozillaZine - Your Source for Daily Mozilla News and Advocacy
  • Bugzilla Project Home Page