Don't auto-focus new query windows

This commit is contained in:
Mattias Erming 2014-09-15 11:25:47 -07:00
parent 7d72f40d91
commit dbeddccca6
1 changed files with 9 additions and 3 deletions

View File

@ -140,10 +140,14 @@ $(function() {
channels: [data.chan]
})
);
sidebar.find(".chan")
var chan = sidebar.find(".chan")
.sort(function(a, b) { return $(a).data("id") - $(b).data("id"); })
.last()
.trigger("click");
.last();
if (!whois) {
chan = chan.filter(":not(.query)");
}
whois = false;
chan.click();
});
socket.on("msg", function(data) {
@ -389,11 +393,13 @@ $(function() {
});
});
var whois = false;
chat.on("click", ".user", function() {
var user = $(this).html().trim().replace(/[+%@~]/, "");
if (user.indexOf("#") !== -1) {
return;
}
whois = true;
var text = "/whois " + user;
socket.emit("input", {
target: chat.data("id"),