Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

On example page, determine if the uerCtx.name is already hashed for t…

…he gravatar image
  • Loading branch information...
commit bc0b98df6ef0674361340025d57c5e754a152a10 1 parent 9a0f0b6
@ryanramage ryanramage authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 priv/main.js
View
4 priv/main.js
@@ -172,6 +172,10 @@ $.couch.browserid.login(function(ev, er, userCtx) {
widget.unbind('click');
var iurl = 'https://www.gravatar.com/avatar/' + Crypto.MD5($.trim(email).toLowerCase()) + "?s=32";
+ if (email.indexOf('@') === -1) {
+ // it is probably already a gravatar hash
+ iurl = 'https://www.gravatar.com/avatar/' + email + "?s=32";
+ }
var gravatar_img = $("<img>").attr('src', iurl);
gravatar_img.appendTo($("#browserid .picture"));
Please sign in to comment.
Something went wrong with that request. Please try again.