function getBackgroundColor (user) {
var m = user.picture.match(/avatar\/(\w+|$)/);
if (m && m[1]) {
return '#' + m[1].substring(0,6);
}
}
Bonne idée ! Quelques remarques cependant :
function getBackgroundColor (user) {
var m = user.picture.match(/avatar\/(\w+|$)/);
if (m && m[1]) {
return '#' + m[1].substring(0,6);
}
}
Bonne idée ! Quelques remarques cependant :