Thursday, July 2, 2009

My Firefox add-on.

Download
How to Create Firefox add-on

I just created my own Firefox add-on and submitted to the Firefox. I was free couple of weeks ago and was getting bored, so thought of doing something. And finally I came up with idea of creating my own Firefox add-on. But there was a problem, I wasn't aware of how to make Firefox add-on. So I did some googling on it and came up with some great links(Thanks to the larry and Sergey). It didn't took more than couple of hours to understand how to make the Firefox add-on. Firefox has made it damn easy ( and if you have any doubt about that, just try to make one for IE).

I was thinking that hard part will be to the add-on, but it revealed to be easy. However I found my self stuck with other question, what to make that is useful, easy to implement (as it's my first add-on) and not already been implemented ? Because everything you think of is almost implemented.

But after doing some brainstorming I finally got the idea, I decided to make Spell Checker (Firefox add-on), which checks the spelling mistakes on the page, and not in edit box. The idea came up from my own experience ( and of other friends) of testing websites. Usually we require to test the website for spelling mistakes too. If the site is live I prefer to use some sites (online services) which provides the facility to find the spelling mistakes from page you have submitted. But most of the time the site we require to test are not live, so we can't use other web service for that. And for that we need to use MS Word (or similar software) . It requires to navigate to each page, copy whole text, paste it in the MS Word and then separates the spelling mistakes. And that's a tedious and time consuming task to do. And so I think a add-on, for such thing will be helpful to me ( and yeah others too.. ).

So I quickly learn some JavaScript, put couple of question regarding the JavaScript and add-on on the forum and finally I made my first running version of Firefox add-on, and submitted to the Firefox. Even though it was having plenty of errors and as tester I wouldn't have release it, But somehow my inner developer, woke up and told me to submit just to see other users reacting.

okay so I made it, I submitted it, and other people will be able to download it, use it, but hang on that's not all. Firefox has a system that when you first submits a add-on, Firefox keeps it in the sandbox (a area where people can download add-on, but with warning).

So next step was to make it public. (so that creepy warning disappears) . But you require to have at least three reviews to make it. That seemed to be easy, but it's not because only people who has account can do that.

After few days I nominated it for the public nomination. But after a long delay of 60 (approximately) days I got the email from Firefox which told me that they can't make it public as I haven't handle the global variable in the add-on and it may create problems to other add-on. It didn't fell good, It can't. But the good thing was that they have suggested me some links to resolve the problem.

So I navigate to the link and do some Googleing on global variables and namespace in JavaScript. And I did find out that global variables are really evil thing.

So after a while I resolved the problem of global variable and submitted the new version of my Firefox add-on with fingers crossed that this time it will become the public.


Download Spell Checker

You can download my add-on form the following page.
https://addons.mozilla.org/en-US/firefox/addon/11259

How to Create Firefox add-on
If you want to learn how to create a Firefox add-on following are couple of resource that might help you.

http://www.rietta.com/firefox/Tutorial/prefs.html
https://developer.mozilla.org/en/Building_an_Extension
https://developer.mozilla.org/en/XUL_Overlays
https://developer.mozilla.org/en/XUL_Reference

0 comments: