This article describes how to create a registered sidebar for the Firefox browser.
This article is a quick start for the creation of a new sidebar for Firefox. What we will do is creating a sidebar and register it so it will be availible in the menu. The goal is creating an empty sidebar that can be used as start for new sidebar applications.
Creating a sidebar requires some GUI creation and registration in the destination application. First a simple XUL page is created. Then the registration files are made and finally the sidebar is packed into an installable XPI file.
This article is a quick start, it won't explain all elements of XUL, packaging and XPI's. It's preferable you have some basic knowledge of how XUL works and how Firefox handles extensions.
Additions to Firefox are installed with packages. A packages exists of the XUL and application logics. Optionally locales and skins can be included. Most additions are provided with a default tree structure, although not required it is recommended to use this structure. Here the package for the sidebar is created, the files included are listed below.
Example 1. Package structure
emptysidebar \- chrome |- content |- locale | \- en-US \- skin
Create all folders, except for <tt>skin</tt>. It is not used for this tutorial.
The <tt>locale</tt> holds the locale, only the en-US locale is created. It is listed in Example 2. The locale includes the name and shortcut keys for the sidebar.