O'Reilly logo

Firefox Hacks by Nigel McFarlane

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hack #84. Do Groundwork for Extension Development

Understand how extensions, themes, and locales fit into the Firefox architecture.

Chapter 7 introduced the key ideas of chrome, chrome: URLs, JAR files, and packages [Hack #75] . Those concepts also apply to more formal chrome enhancement projects. Such projects also require the concepts of extensions, themes, locales, XPIs, and XPInstall. This hack describes those concepts in more detail. It's all about collecting together the jigsaw pieces in preparation for solving the puzzle.

There are some basic differences between quick hacks to the chrome and fully prepared extensions. These are the main advantages of extensions:

  • They have a formal concept of version.

  • They can be updated after they are installed.

  • They can be updated across the Web from a web site.

  • If Firefox is upgraded, installed extensions are not lost.

  • Registration information exposes details of extensions to scripts.

  • Extensions are, by default, stored per-profile in the profile area.

  • Firefox's -safe-mode option allows extensions to be disabled easily.

Spot Extension Files

All installed extensions live in the extensions directory, either in the profile area or in the install area. In that directory are two important files. Extensions.rdf is a small database of all the currently installed extensions. The other file, usually named something like installed-extensions.txt, lists the extensions that were discovered the last time Firefox did a big audit of all the extensions in the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required