Fix bug friend + virtual

This commit is contained in:
cuom1999 2022-01-10 23:16:34 +07:00
parent 3ba270bd07
commit 5a645d712f

View file

@ -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]] + ')';
});
}