mirror of
https://github.com/thelounge/thelounge
synced 2024-12-11 21:22:35 +00:00
18 lines
360 B
JavaScript
18 lines
360 B
JavaScript
"use strict";
|
|
|
|
const $ = require("jquery");
|
|
const socket = require("../socket");
|
|
const sidebar = $("#sidebar");
|
|
|
|
socket.on("quit", function(data) {
|
|
const id = data.network;
|
|
sidebar.find("#network-" + id)
|
|
.remove()
|
|
.end();
|
|
const chan = sidebar.find(".chan")
|
|
.eq(0)
|
|
.trigger("click");
|
|
if (chan.length === 0) {
|
|
sidebar.find(".empty").show();
|
|
}
|
|
});
|