Add Gravatar Everywhere

By docwhat Last update Dec 21, 2013 — Installed 1,750 times.

Archived Comments (locked)

Subscribe to Archived Comments 8 posts, 5 voices

Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

docwhat Script's Author

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.

docwhat Script's Author

Good catch nazgullien and jdub! I have fixed the source. :-)

jdub User

@nazgullien: Change line 293 to read:

var email = el.href.replace(/^mailto:/, '').replace(/\?.*$/, ''),

@docwhat: Please consider the above for inclusion in future versions of this script. :-)

nazgullien User

Hi !

Nice idea !
There is a problem when mailto: links contain

parameters, the md5sum computing includes
and is erroenous.

example found :

<a href="">

Bye !

docwhat Script's Author


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.


esquifit Scriptwright

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, 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 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.

docwhat Script's Author

I didn't add any include sites, since you will probably want to decide when you want it turned on.

Works great for Bugzilla.