How do I write a Firefox Addon? [closed]
What are some resources for getting started writing a Firefox Addon? Is there an API guide somewhere? Is there a getting started tutorial somewhere? Is there a developer discussion board somewhere?
Solution 1:
We tried to make http://developer.mozilla.org/en/Extensions answer all those questions. The first three links in the documentation section are about getting started (that includes Adam's link). The newsgroup and the irc channel in the Community section are the official discussion boards.
Mozilla is very complex, so any kind of API guide would be overwhelming and hard to write. So your best bet is to check the code snippets page (also linked from the MDC Extensions page), then search MDC/google, then ask in the forums.
Solution 2:
The official page listed above is good, but this is the most useful page I have found to get started:
http://blog.mozilla.com/addons/2009/01/28/how-to-develop-a-firefox-extension/
More recent official post
And I found starting with an extension generated from the Add-on Builder to be a great start also. You go right to tweaking JavaScript and seeing what happens: https://addons.mozilla.org/en-US/developers/tools/builder
You are also really going to want to be able to debug, you have two choices for that: ChromeBug - Which gives you FireBug for Firefox Extensions. WebStorm, but you need to use the early-access version and it currently requires a patch I wrote.
Solution 3:
Here's the official starter page from Mozilla for writing your first extension. http://developer.mozilla.org/en/Building_an_Extension
Solution 4:
I found greasemonkey to be a great starting point... I used it to create some functionality for a site, then I used this script compiler to turn my script into a working add-on. Of course it's machine generated... but it's very few files and pretty easy to understand. Just unzip the .xpi and tinker away.
Solution 5:
This is a great resource to start learning how to build a FireFox extension:
How to create Firefox extensions
This is an awesome tutorial and will covers most type of extensions.
Edit: Updated link to use archived copy since original page no longer exists