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?
-
19Note that there are at least two types of Firefox addons/extensions: The "old", XUL- and XPCOM-based extensions and addons based on the more modern Jetpack API, also called "Addon SDK", which uses JavaScript, HTML and CSS. As a web developer I found the modern API much easier to work with: https://addons.mozilla.org/en-US/developers/docs/sdk/latest/dev-guide/index.html There may be some things that you can't do with the Jetpack API yet. You can look at the differences here: https://addons.mozilla.org/en-US/developers/docs/sdk/latest/dev-guide/guides/sdk-vs-xul.html – chiborg Jul 31 '12 at 09:45
-
4@chiborg, I wrote a detailed answer about Add-on SDK here: http://stackoverflow.com/questions/20409349/what-is-the-easiest-way-to-develop-firefox-extension, hope this will be useful. – dorserg Dec 10 '13 at 23:03
-
3All answers, except for the very general http://developer.mozilla.org/en/Extensions, are outdated due to the WebExtension standard. Either this gets reopened, or some other measures are taken to link to that new standard. See http://stackoverflow.com/a/41107443/1587329 – serv-inc Mar 16 '17 at 21:50
-
@serv-inc ... and now that's out of date, too. To think people use StackOverflow for research, and this is the state of it. – autistic Nov 06 '22 at 22:59
-
1@autistic: thanks. Correct links seems to be https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions . Isn't [https://en.wikipedia.org/wiki/The_Wisdom_of_Crowds][crowd intelligence] awesome ? – serv-inc Nov 07 '22 at 08:56
6 Answers
We tried to make https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions answer all those questions. The first three links in the documentation section are about getting started (that includes something like Adam's link, before it became stale). 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.
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.
Here's the official starter page from Mozilla for writing your first extension. https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension

- 1
- 3
- 35
- 80

- 30,705
- 58
- 191
- 286
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.

- 10,239
- 14
- 60
- 76
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

- 11,315
- 4
- 46
- 43
This has the best solutions: https://developer.mozilla.org/en/Extensions but you can try greasemonkey script compiler

- 21
- 1