Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I write a Firefox Addon? [closed]

People also ask

How do I write an addon in Firefox?

Once you're logged in, you can see the section “My Add-ons”. Click on the Submit a New Add-on button at the bottom right. The process to submit a new add-on will then start. You'll first be asked if you'll publish the add-on on Firefox add-ons Manager or you'll distribute it on your own.

How do I undo a closed tab in Firefox?

To open the most recently closed tab in Firefox, right-click on the tab bar and select Undo Close Tab from the popup menu or press Ctrl + Shift + T on Windows or Command + Shift + T on Mac.

What are Firefox extensions written in?

They are written using standard Web technologies - JavaScript, HTML, and CSS - plus some dedicated JavaScript APIs. Among other things, an add-on could: Change the appearance or content of particular websites. Modify the Firefox user interface.


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.


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. http://developer.mozilla.org/en/Building_an_Extension


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.


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


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