mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 22:10:22 +00:00
16 lines
372 B
JavaScript
16 lines
372 B
JavaScript
"use strict";
|
|
|
|
const $ = require("jquery");
|
|
const socket = require("../socket");
|
|
const utils = require("../utils");
|
|
const sidebar = $("#sidebar");
|
|
|
|
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) {
|
|
utils.setNick(nick);
|
|
}
|
|
});
|