(fix) imprived the gravatar directive to extract email address between < >
This commit is contained in:
parent
33d0f30d97
commit
b5ca697b43
|
@ -12,10 +12,16 @@
|
|||
*/
|
||||
function Gravatar() {
|
||||
return function(email, size) {
|
||||
var hash, s = size;
|
||||
var x, y, hash, s = size;
|
||||
if (!email) {
|
||||
return '';
|
||||
}
|
||||
x = email.indexOf('<');
|
||||
if (x >= 0) {
|
||||
y = email.indexOf('>', x);
|
||||
if (y > x)
|
||||
email = email.substring(x+1,y);
|
||||
}
|
||||
if (!size) {
|
||||
s = 48; // default to 48 pixels
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue