Reload page on disconnect

This commit is contained in:
Mattias Erming 2014-09-10 13:26:59 -07:00
parent 64d1c99241
commit 1862e2af93
3 changed files with 10 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -61,9 +61,17 @@ $(function() {
console.log(e);
});
socket.on("connect_error", function(e) {
location.reload();
});
socket.on("auth", function(data) {
var body = $("body");
var login = $("#sign-in");
if (!login.length) {
location.reload();
return;
}
if (body.hasClass("signed-out")) {
var error = login.find(".error");
error.show().closest("form").one("submit", function() {
@ -265,7 +273,6 @@ $(function() {
"mode",
"quit",
].indexOf(name) !== -1) {
console.log("toggle " + name);
chat.toggleClass("hide-" + name, !self.prop("checked"));
}
}).find("input")

View File

@ -1,7 +1,7 @@
{
"name": "shout",
"description": "A web IRC client",
"version": "0.22.0",
"version": "0.23.0",
"author": "Mattias Erming",
"preferGlobal": true,
"bin": {