Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function printAvatar(email, opts){
opts = opts || {};
if (img) img.remove();
body.addClass('loading');
img = o(Grt.img(email, opts))
.appendTo(img_ph)
.on('load', function(){
body.removeClass('loading');
});
profile_ph.empty();
var profile = Grt.profile(email, function(err, data){
var prts = [
'displayName',
'profileUrl',
'id',
'hash',
'requestHash',
'thumbnailUrl'
];
for (var i = 0; i < prts.length; i++) {
if (data[prts[i]]) {
profile_ph.append(o('<p>').append(
o('<span>', { text: prts[i] + ': ' }),
o('<strong>', { text: data[prts[i]] })
));
}</strong></span></p>