145

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?

4

6 回答 6

98

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.

于 2008-08-24T01:42:07.893 回答
30

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.

于 2011-02-14T15:32:48.293 回答
20

Here's the official starter page from Mozilla for writing your first extension. http://developer.mozilla.org/en/Building_an_Extension

于 2008-08-24T01:31:59.447 回答
10

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.

于 2008-12-02T06:06:40.920 回答
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

于 2008-08-24T01:28:40.717 回答
2

This has the best solutions: https://developer.mozilla.org/en/Extensions but you can try greasemonkey script compiler

于 2010-11-30T16:56:05.800 回答