theme selector

light blue screenshot grey screenshot navy screenshot dark green screenshot red and black screenshot

by Tony Chang

All opinions on this site are my own and do not represent those of my employer.

Creative Commons Attribution License

annotate Google

Jan 14, 2005, 12:51am EST



I’m working on a Firefox extension for annotating Google search result pages. It currently checks each page for RSS or Atom feeds and places links to feeds and also grabs a few popular tags from about the page.

I started working on it last weekend, but while reading evan‘s tech blog today, I learned about greasemonkey, a Firefox extension that allows you to overlay site specific javascript. Wow, that’s exactly what I needed. So I started using it but found out that it may not be ideal because of security problems features that apply to scripts, but not extensions. So I guess I can’t use greasemonkey after all, but it has provided a convenient way to test the script.

Oh, perhaps you want to try out the extension. While you’re welcome to install greasemonkey and try out annotate Google, it’s not quite ready yet. In addition to annoying security warnings on every Google SERP, it only makes one XMLHttpRequest at a time due to a bug on my part (new requests are clobbering old requests, maybe something’s wrong with my closure).

Update: I actually wrote it.

Jeremy Dunck at Jan 20, 2005, 11:27pm EST

I’m involved in Greasemonkey, and thought you might like some feedback.

First, you’ve made it a bit problematic to install the user script. The extension adds an option (Install User Script…) to the context menu if the link’s name ends in “.user.js”, which allows the user to easily install it. However, the link in viewcvs takes you to the checkin log. If you want people to install it, you should directly link to the script itself, insuring that the URL ends in “user.js”.

Second, it may not be clear from the docs, but your script runs in the context of the document, not in the context of the extension. When Greasemonkey finds a URL match, it appends your script to the document’s DOM. I’m not sure if this addresses your security concern. … OK, looks like not, since you’re trying to fetch data from different URLs.

Third, if you do write scripts for Greasemonkey that you’re happy with, I’ve started a directory, so you may want to add it to that listing.

allowed HTML: a, blockquote, ul, ol, li, dl, dt, dd, b, i, strong, em, code, abbr, acronym, sub, sup, span, pre

allowed HTML: a, blockquote, ul, ol, li, dl, dt, dd, b, i, strong, em, code, abbr, acronym, sub, sup, span, pre