Creating a Mozilla Extension

Warning: The content of this article may be out of date. This tutorial describes how to create an extension for the old versions of Mozilla Suite (currently SeaMonkey). See Building an Extension for an up-to-date tutorial (it focuses on Firefox, but is also applicable to other new applications).

A Mozilla extension is an installable enhancement to the Mozilla browser that provides additional functionality (for example Linky, which adds an item to the context menu for opening multiple links in a document or selection). This tutorial walks you through the process of building a Mozilla extension that adds an icon to Mozilla's status bar showing the current status of the Mozilla source code (i.e. whether or not the latest version of the code is compiling successfully and passing tests). The extension will access Tinderbox,'s webtool for tracking source code status, to get the status of the code.

Completing this tutorial will give you a basic understanding of how Mozilla's user interface (UI) is constructed, how to find the source code for the UI you want to extend, how to make an installation of Mozilla modifiable, how to use Mozilla's network library to load and parse web pages in JavaScript, and how to use dynamic overlays to package a Mozilla extension for installation by others.


  1. Prerequisites
  2. Tinderbox
  3. Making a Mozilla installation modifiable
  4. Finding the file to modify
  5. Finding the code to modify
  6. Adding the structure
  7. Specifying the appearance
  8. Enabling the behavior - retrieving tinderbox status
  9. Enabling the behavior - updating the status bar panel
  10. Enabling the behavior - updating the status periodically
  11. Making it into a static overlay
  12. Making it into a dynamic overlay and packaging it up for distribution
  13. Conclusion

Original Document Information

  • Author(s): Myk Melez
  • Last Updated Date: September 19, 2006
  • Copyright Information: Portions of this content are © 1998–2007 by individual contributors; content available under a Creative Commons license | Details.