Add Gravatar Everywhere
Last update on Jul 25, 2008
This script searches through the page looking for <a href="mailto:"/> links and adds a 16x16 gravatar.com image. Works great for Bugzilla. :-)
You could comment on this script if you were logged in.
7 comments
You could comment on this script if you were logged in.

login to vote
Everytime I click "install this script" it blows away all the exceptions I add to the script. Is there a way to update a script without blowing away the exceptions? Other than cut-and-paste, I mean.
login to vote
Good catch nazgullien and jdub! I have fixed the source. :-)
login to vote
@nazgullien: Change line 293 to read:
@docwhat: Please consider the above for inclusion in future versions of this script. :-)
login to vote
Hi !
Nice idea !
parameters, the md5sum computing includes and is erroenous.There is a problem when mailto: links contain
example found :
Bye !
login to vote
esquifit:
I didn't realize that GM had a storage mechanism. I was caching in-page, but not across pages. Nifty! Thanks for telling me.
I'm not sure storing images is worth it. :-/ I'll think about.
This was actually written as a proof of concept for an "add gravatars" Bugzilla extension. I realized this could work pretty much anywhere and so I made a few tiny changes and submitted it here.
Ciao!
login to vote
Nice idea. I have a couple of suggestions:
1) Cache the mail addresses in order to avoid calculating the md5 multiple times(and making repeated requests to gravavtar.com, although Firefox should handle this already)
2) Cache the images themselves as base64-encoded strings via GM_set/getValue. The current date can also be cached so you can force a new request to gravatars.com in case the cached image is older than, say, one month.
Incidentally this would be highly reusable code. Consider making a library (for caching serialized objects up to a given amount of time) now that GM supports it natively.
login to vote
I didn't add any include sites, since you will probably want to decide when you want it turned on.
Works great for Bugzilla.