hardlounge/client/js/socket-events/nick.js
2018-04-15 22:17:30 +03:00

15 lines
314 B
JavaScript

"use strict";
const $ = require("jquery");
const socket = require("../socket");
socket.on("nick", function(data) {
const id = data.network;
const nick = data.nick;
const network = $("#sidebar").find("#network-" + id).data("nick", nick);
if (network.find(".active").length) {
$("#nick").text(nick);
}
});