First off, let me say that the extension API of Mozilla sucks. Yes I said it, it sucks.
The documentation is terrible, the code is horrible, and the inter-operability of the whole XPCOM components design blows.
The whole Mozilla codebase looks like something done in an incredible rush. There are several logical mistakes. Oh, and someone please tell the Mozilla developers that extension writers shouldn’t need to review the codebase to figure out how some components behave. And if they do, due to some seriously handicapped documentation of the API, please give them clear comment code. I’ve been a user of Firefox since the beginning(is it like 5 years ago?) and this has come as a big disappointment.
I will soon put the extension online, and publish some more details.
By the way, why are some parts of the code copyright by Google?