hotsh/rstat.us — pull request #722 by carols10cents (2012-11-18 20:32:34+00:00)
Title: Avatar timeout

This fixes a bunch of little things having to do with avatars that dont load, none of which we have issues for that I could find.

One issue is that some avatars don't error right away but instead take >30s to time out. An example of this is thelastgherkin@rainbowdash.net. What you end up seeing is the alt text that says "avatar" where an avatar image should be, which is strange.

I made this slightly less ugly, I think, by setting a background image on the img of the default avatar and by removing the alt text. This way, in firefox at least, you'll see an outline of the broken image on top of the default avatar while it's waiting and then that outline will go away, leaving only the default avatar when the request times out. Chrome just shows the default avatar the whole time. I think this is better than the alt text "avatar" there, and I don't think "avatar" really adds meaning for screenreaders anyway.

The other fix in here is to scope the script that replaces errored images to only do that for avatars-- it doesn't make sense to do that for any other image on the site if some configuration is broken.