Widget:EL4C Participants

display eL4C participants in table format  $(function { /* get the last participant number to date */  var pno = parseInt($('#participants tr:last td:first').text, 10) || 0;  var parts = [];  $('ul').each(function { if ($('li', $(this)).length == 8) { var part = []; $('li', $(this)).each(function {       var k = $(this).text.match(/\s*([^:]+):\s*(.*?)\s*$/);        if (k && k.length == 3) {          part[k[1]] = k[2];        }      }); part['uname'] = (part['WikiEducator username'] || '').replace(' ', '_'); pno = pno + 1; parts.push(part['uname']); var row = ' ' + pno + ' '; row += ' ' + part['First name'] + ' '; row += ' ' + part['Last name'] + ' '; row += ' ' + part['Gender'] + ' '; row += ' ' + part['Organization'] + ' '; row += ' ' + part['Title/Position'] + ' '; var clink = part['Country of Residence'].replace(' ', '_'); row += ' '+ part['Country of Residence'] + ' '; row += ' email '; row += ' My contributions '; row += ' '; row += ' '; row += ' '; $('#participants tr:last').after(row); $(this).css('display', 'none').next.css('display', 'none').next('p').css('display', 'none'); } });  $.post('/api.php', { action: 'query' , list: 'users' , usprop: 'editcount' , ususers: parts.join('|') , format: 'json' }, function(data) { for (var u in data.query.users) { var user = data.query.users[u]; $('#' + user.name.replace(' ', '_')).text(user.editcount); }   }); });