Saturday, September 5, 2009

How-to develop a Firefox Extension in Linux (I)

Based on last available tutorial from Mozilla at this date, Mozilla Extensions. For a detailed explanation consult there.

Setting a develpment enviroment:

For Ubuntu:

To run more than a single firefox instance:
/usr/bin/firefox -no-remote -P dev

"about:config" settings:

javascript.options.showInConsole = true
nglayout.debug.disable_xul_cache = true
browser.dom.window.dump.enabled = true
javascript.options.strict = true
extensions.logging.enabled = true

Extension Developer Extension : http://addons.mozilla.org/en-US/firefox/addon/7434/

Profile extension folder:
~/.mozilla/firefox/[profile name]/extensions
where [profile name] = name of the profile, usually with prefix generated by Firefox.

Extensions are ZIP compressed files, but to develop using a more convenient folder structure:
  • Create a file in the profile extension folder with a GUID or your mail as name.
  • Write the absolute path of the xpi package as content.

Extension Wizard to generate skeleton: http://ted.mielczarek.org/code/mozilla/extensionwiz/

No comments:

Post a Comment