Fix bug friend + virtual
This commit is contained in:
parent
3ba270bd07
commit
5a645d712f
1 changed files with 11 additions and 1 deletions
|
@ -330,8 +330,18 @@
|
|||
|
||||
function add_initial_friend_rank() {
|
||||
var usernames = $('.user-name .user a').map(function() {return this.text}).get();
|
||||
|
||||
var is_virtual = [];
|
||||
$('.user-name').each(function() {
|
||||
if($(this).children('sup').length) {
|
||||
is_virtual.push(1);
|
||||
}
|
||||
else is_virtual.push(0);
|
||||
});
|
||||
console.log(is_virtual);
|
||||
|
||||
$('.rank-td').each(function(i) {
|
||||
this.innerHTML += ' (' + window.user_rank[usernames[i]] + ')';
|
||||
if (!is_virtual[i]) this.innerHTML += ' (' + window.user_rank[usernames[i]] + ')';
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue