Extension guidelines

From MozillaZine Knowledge Base
Revision as of 18:19, 1 August 2005 by Racer (talk | contribs) (prefSep change)
Jump to navigationJump to search

Generally accepted guidelines to be used by extension authors.

If you have a proposal for a new guideline, please add the prefix "Proposal:" at the front of the guideline itself. If the new guideline is acceptable to the community, this prefix can be removed after two weeks. If the guideline is not acceptable, it will be removed from the page, with a summary comment indicating why it was removed.

Menu Items

  • No extension should add more than one menu item per major feature that it offers. If you need to add multiple items, add a submenu instead.
  • A menu item for "Options" is unnecessary as that is included in the Tools->Extensions window for your extension.
  • Proposal: Add a setting to remove the menu item with a GUI-accessible option.

Tools Menu

  • Add web development menu items after the "devToolsSeparator" separator, but not after any subsequent separator. Use insertafter="devToolsSeparator"
  • Add non-development menu items before the "devToolsSeparator" separator, but after any preceeding separators. Use insertbefore="devToolsSeparator".
It has been brought up that the "prefSep" separator does not exist on OSX or Linux (Gnome), so don't use it! Ideally, we would like to put most tools menu items in their own section (or submenu).
  • Proposal: Windows only: Never add the menu item at the bottom of the Tools menu (after the Options menu item).

Context (Popup) Menu

Miscellaneous

  • Never make the user go through multiple steps to uninstall the Extension. If removal is complex, write your own uninstall script and tie it to a GUI-accessible button.