username to userslug change

This commit is contained in:
Baris Usakli
2013-06-24 14:33:53 -04:00
parent ad11be657e
commit d3a190d74e
20 changed files with 148 additions and 88 deletions

View File

@@ -274,10 +274,11 @@
socket.on('api:get_users_in_room', function(users) {
var anonymous = users.anonymous,
usernames = users.usernames,
userslugs = users.userslugs,
usercount = usernames.length;
for (var i = 0, ii=usercount; i<ii; i++) {
usernames[i] = '<strong>' + '<a href="/users/'+usernames[i]+'">' + usernames[i] + '</a></strong>';
usernames[i] = '<strong>' + '<a href="/users/'+userslugs[i]+'">' + usernames[i] + '</a></strong>';
}
// headexplosion.gif for fun, to see if I could do this in one line of code. feel free to refactor haha