Wikipedia Lookup - development blog

Development blog for the Wikipedia Lookup addon for Firefox. Just some random notes on what's going on and addon development

Monday, July 31, 2006

Not quite so frustrated..

My previous post was about frustrations related to Extension development. I poked around the MozillaZine forums to try and see if I was a complete moron or if in fact some other people are having the same kinds of problems.

I was really happy when I encountered this thread which I think has a few good points. 1) It shouldn't be this difficult to create an extension for both FF and TB (I guess that's short for Thunderbird) 2) There is always some smart guy out there who actually knows how easy it is.
In the thread the Extension Wizard is mentioned. I wish I'd known about that one when I started out. Basically it does all the boring and unnecessary complicated stuff for you. It creates an extension with the preferences you want.
So for anyone starting out with extension development I think this would be a huge help for both getting started and to get a sense of how one should design code for an extension.

Porting the WLE to Thunderbird

Being a naive young man I thought "Hey, why don't I port my extension over to Thunderbird!". Both products are from the Mozilla Foundation and I've read that it's pretty much the same thing to create extensions for Firefox and Thunderbird.

I updated the install.rdf and got Thunderbird to accepts it, and I thought "wow, it actualy is easy". That was until I tried to do anything with the extension. Of course it didn't work. Not even the extension options worked in Thunderbird. It seems like there's some issues with the chrom URI's or something...

Whatever it is, I can document that it's NOT the same thing to create extensions for Firefox and Thunderbird. So I guess I have to do some more surfing on MozillaZina and Mozilla Development Central...

Sunday, July 30, 2006

0.3.0 beta available

I have just uploaded the beta of the new 0.3.0 release of the WLE onto the BOSS distribution directory. To install it just save the XPI onto your system and then open it in Firefox, this will start the installation.

You are welcome to download it and check it out, but as with all Beta software this is something you do at your own risk and I can not be hold responsible for messing up your browser.

Some of the features are already mentioned on this blog and I relay think those features elevates the extension to a higher level. It's not just some simple plugin, but it actually does something more that just open a new tab.

Please let me know if you encounter any problems with the new release. If you are running Linux or Mac please let me know if it works for you too. I do not have access to a computer running Linux or OS X, so it would be nice to know if it actually works on all platforms. Just add a comment to the page to let me know what you think.

Introducing the WLE statusbar!

I am very happy to introduce a new killer feature for the Wikipedia Lookup Extension. While working on the new lookup feature I also started playing with one feature I planned from day one. Having an item in the statusbar which could be clicked to display a search box which the user could use to write queries to Wikipedia.

In its initial positing the statusbar just contains a small icon as seen in the screenshot below.
. The icon isn't very cool or created in a good way, but you might see that it looks somewhat like the icon in the about section of the extension.

Expanding the statusbar provides the user with a textbox to enter a query for Wikipedia. In order to save space in the statusbar I decided not to add a button, but instead just handle the "Enter" keyboard event.

I hope that this new feature is something that more people than myself find useful. Regardless of it's success I find it pretty useful and I learnt some more stuff about writing extensions for Firefox. It is sometimes a pain and quite frustrating, but in the end it's worth it.

Lookup enabled for textareas and textboxes

I read some of the comments on and there where some interesting feature requests there.

The first priority was the language issues, which I understand is an important feature. I too have a need for looking up both English and Norwegian word, so I am too very happy this feature is in place.

Secondly was a feature I hadn't thought of, which was that the extension couldn't lookup word inside a textarea or textbox. So I sat down on a hot Sunday evening here in Oslo and thought I'd give it a shot.

Getting the WLE to lookup inside a other controls wasn't as easy as I'd hoped. You couldn't just use the gContextMenu.isTextSelected. Some googling later I discovered the document.commandDispatcher.focusedElement property and then everything was pretty straight forward.