hardlounge/client/js/socket-events/nick.js

15 lines
314 B
JavaScript
Raw Normal View History

2017-05-18 20:08:54 +00:00
"use strict";
const $ = require("jquery");
const socket = require("../socket");
socket.on("nick", function(data) {
const id = data.network;
const nick = data.nick;
2018-03-16 14:10:28 +00:00
const network = $("#sidebar").find("#network-" + id).data("nick", nick);
2017-05-18 20:08:54 +00:00
if (network.find(".active").length) {
2018-03-16 14:10:28 +00:00
$("#nick").text(nick);
2017-05-18 20:08:54 +00:00
}
});