mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 14:00:21 +00:00
14cc8b7827
See https://www.reddit.com/r/javascript/comments/8f57i1/psa_there_are_over_1000_people_in_the_us_named/dy0rib2/
14 lines
324 B
JavaScript
14 lines
324 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 .network[data-uuid="${id}"]`).attr("data-nick", nick);
|
|
|
|
if (network.find(".active").length) {
|
|
$("#nick").text(nick);
|
|
}
|
|
});
|