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

15 lines
324 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;
const network = $(`#sidebar .network[data-uuid="${id}"]`).attr("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
}
});