Remember active window between logins

This commit is contained in:
Mattias Erming 2014-07-25 04:25:10 -07:00
parent 8ae98d81b2
commit c341d7a0b6

View File

@ -90,13 +90,11 @@ $(function() {
}) })
); );
sidebar.find(".chan").eq(0).trigger("click");
sidebar.find(".empty").hide(); sidebar.find(".empty").hide();
$("body").removeClass("signed-out"); $("body").removeClass("signed-out");
var id = $.cookie("target"); var id = $.cookie("target");
var target = sidebar.find("[data-target=" + id + "]").trigger("click"); var target = sidebar.find("[data-target='" + id + "']").trigger("click");
if (target.length === 0) { if (target.length === 0) {
var first = sidebar.find(".chan") var first = sidebar.find(".chan")
.eq(0) .eq(0)
@ -276,7 +274,9 @@ $(function() {
return; return;
} }
if (self.hasClass("chan")) {
$.cookie("target", target); $.cookie("target", target);
}
chat.data( chat.data(
"id", "id",
self.data("id") self.data("id")