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 del.icio.us about the page.
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.
tony at Jan 21, 2005, 03:57am EST
There are also other problems like not using very unique function names, but due to the security issue, I’m just going to write a stand alone extension. Unfortunately, there will probably be bigger problems like not hammering del.icio.us too hard.
Thanks for the feedback anyway.
Jeremy Dunck at Jan 21, 2005, 10:27am EST
I realize it’s not going to help this situation, but is there a reason you couldn’t scope everything in an anonymous function, similar to what’s done here?
tony at Jan 21, 2005, 12:14pm EST
Nope, I was going to refactor it to that when I finished but I wasn’t quite there yet …
Jeremy Dunck at Jan 30, 2005, 11:17pm EST
Tony, I’m very happy to have stumbled on something for you.
Via hackdiary, a script that uses delicious from a different site.
Note in the header of that script, these comments:
// This script requires the following in your prefs.js:
// user_pref(“capability.principal.codebase.p0.granted”, “UniversalBrowserRead”);
// user_pref(“capability.principal.codebase.p0.id”, “http://www.bbc.co.uk”);
// user_pref(“signed.applets.codebase_principal_support”, true);
So it appears that a user can specifically punch holes in their security to allow special rights based on URL. So your particular use should be possible.
Ideal? No… but useful and interesting.
tony at Jan 31, 2005, 03:35pm EST
Cool! Thanks for pointing that out, I’ll look into it later.