notes snippets

Notes on how to develop a Firefox extension

Tagged firefox, extension, development, notes  Languages 

Create a new profile for extension development

Tweak Firefox configuration for extension development\_up\_extension\_development\_environment

Create a skeleton extension

Extract it to the your project folder, for example:


Setup Firefox to load your extension

Follow these instructions to configure Firefox to load your extension from /home/name/projects/my_extension:\_up\_extension\_development\_environment\#Custom\_code\_location\_up\_extension\_development\_environment\#Using\_directories\_rather\_than\_JARs

Install the Extension developer

Start Firefox with the development profile

firefox-bin -P development -no-remote

To start the default profile use:

firefox-bin -P THE_PROFILE_NAME -no-remote

Build your extension

The extension wizard includes a build script, but it might be a good idea to upgrade it to the latest version, which can be found here (including a Windows build script):\_build\_script


If you're on windows and using CygWin, you might get this error:

./ line 6: $'\r': command not found
./ line 29: $'\r': command not found
./ line 40: $'\r': command not found
./ line 70: syntax error near unexpected token $'do\r''
'/ line 70: for CHROME_SUBDIR in $CHROME_PROVIDERS; do

The solution is to run the dos2unix command on the *.sh files: