mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
filter out yourself from users online list
This commit is contained in:
parent
91bfa65fe2
commit
8f43ceed9d
1 changed files with 6 additions and 0 deletions
|
@ -345,6 +345,12 @@
|
|||
}
|
||||
|
||||
function processData(data, type) {
|
||||
// Filter out yourself from the users list
|
||||
var removeIndex = data.users.map(function(user) { return user.username }).indexOf(myUsername);
|
||||
if (removeIndex >= 0) {
|
||||
data.users.splice(removeIndex,1);
|
||||
}
|
||||
|
||||
var num = data.users.length;
|
||||
if (type === "everyone") {
|
||||
$(".tabs li:nth-child(1)").text("Everyone (" + num + ")");
|
||||
|
|
Loading…
Reference in a new issue