From 8f43ceed9def5baf7389d35f61af3acd27c38762 Mon Sep 17 00:00:00 2001 From: Faye Li Date: Fri, 10 Feb 2017 16:22:30 -0800 Subject: [PATCH] filter out yourself from users online list --- scripts/system/html/users.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/system/html/users.html b/scripts/system/html/users.html index c18162ff8a..b49e3e63b1 100644 --- a/scripts/system/html/users.html +++ b/scripts/system/html/users.html @@ -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 + ")");