Log in

No account? Create an account
Previous Entry Share Next Entry
Firefox Extension
Recently, Joel has been working on an extension to make FOAF information encoded in a page more easy to find. Specifically, he's working on a Firefox extension which will light up when there is FOAF information, and display a transparent overly describing the information. I love the idea, and have been watching him attempt to deal with parsing RDF in Javascript - a singularly difficult task in any language, but something I can feel the pain of doing in Javascript.

At the same time, I became interested in the DOAP project, and decided that with a little bit of help from Joel, I could do something along the lines of what he's doing, only much simpler: Simply provide an image that lights up when a page contains DOAP information, and allow the image to be clickable to redirect to an HTML description of the project.

With a lot of help from Joel (He basically did all the hard work, and told me where I could put some of my own Javascript in the files he gave me), I've got it working, my first Firefox Extension.

The project is pretty well described at that page, and is really simple: if a page supports DOAP (with a <link> tag), then it will light up. Click the little icon, and all of a sudden, you're viewing all the information about the project: mailing list, CVS, Maintainer info, etc.

The page, for the time being, is in French only, and maintained by stork, who is now on vacation. However, the idea is something I hope to expand upon, and perhaps to integrate with other similar projects. There are already extensions which do information for CC licensed pages, and with the FOAF extension, these kind of things could be provided to offer a more generalized semantic web plugin.

Mostly, this is just me learning enough XUL+JS to learn how extensions work, and how to make one, but it's still pretty nifty. Fore more information on the extension, see the page.

Also, if anyone tries it out, and it works (you can tell how to tell if it works at that page), please, open Firefox's about page and copy paste me your version string. The same applies if it doesn't work. I have gotten one complaint that in XP SP 2 with the latest nightly build that it doesn't work. I am aware that it will likely only work with .9 and up, because it depends on the new extension manager. Of course, anyone on Windows should be running .92 anyway, as there is a vulnerability in versions less than that.

It's late. I'm tired. But I feel accomplished. And that's a good thing.

  • 1
Doesn't work for me.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8

Ok, that could be why. *runs off to upgrade* I'll try again and let you know. ;)

Works now. :)

That's bizarre. The About Firefox thing says 0.9.2, but then has this:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.8

Mine too. Except I have 0.9.1...I just patched it, so it doesn't have the security bug but is still the older version.

Like Freso said below, it's related to the fact that you installed over the old copy: if you install a fresh copy, or uninstall the other one first, it works just fine and reports the correct string.

It looks like someone screwed up with the Windows build. The Mac OS X 0.91 and Linux 0.91 both report sensible strings.


Try to uninstall your old Firefox before installing the new one, instead of installing the new one on top of the old. That should fix it. ;)

If the site had told me to do that, I would have. But I don't really care what version it reports itself as being, and I'm far too lazy to fix it. :)

Eh... actually, it does tell you to do so. Check the installation instructions for windows in the release notes...

Are you going to submit DOAPer to Mozilla Update?

Right now I'm waiting on Joel to see if he can work out his FOAF issues. If he can, and get RDF parsing working, then I'll probably wait on that and put out a new version that supports it.

If he can't, then I'll probably keep on with the current version.

Really, I'd like to have a better answer than "Click here to redirect to some guy's page" before I submit it to anywhere.

*snicker* I did that.

You want the following:

document.evaluate for finding the RDF.
document.implementation.createDocument for parsing it.
document.evaluate for extracting data from the parsed document.

Mozilla has some nice extensions that way.

if you happen to have code for doing that, I would like to see it. The main issue with extensions is having them pull remote files (i.e. rdf files) which apparently cannot be done because of js security.
I am trying to figure a workaround.. but if you know of a way?


An extension can pull remote files, but only if it's running with a "chrome://" codebase.

well.. for remote rdf that just won't work.
I am currently mussing around with appending div/iframes with the data that I can use..
will see if that works..

No, no. I meant that the extension has to have "chrome://" codebase. The RDF can be anywhere.

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3

Firefox 0.9.3 under Windows 2000 apparently works with it (at least it 'lights up' at the extension's page), but when I click it, it says it can't talk with mouettes.balbinus.net. Oh, and it acts odd when the DOAP-page is in one tab and I do the DOAP-check and then go back ot this tab to write this comment - the DOAP icon is still coloured. Only happens if I use alt-tab, not if I use the mouse to change. Probably a Mozilla/Firefox bug though. And if I just do an alt-tab round between the three tabs (DOAP - LJ - LJ) it'll have colour on the DOAP and the first LJ, on the second LJ it's grey scale again. Weird. Oh well.

Re: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3

The problem with the doap-a-matic not working may have been on stork's end - this is all dependant on his server, and hs'e changed some links around recently. He mentioned that it should be fixed now, not sure if it is or anything like that.

The buggy behavior honestly sounds like a Mozilla issue - I can't reproduce it on the mac version, and it's using a rather common navigation change event.

Glad you got it to work!

  • 1