Reload page on disconnect
This commit is contained in:
parent
64d1c99241
commit
1862e2af93
File diff suppressed because one or more lines are too long
@ -61,9 +61,17 @@ $(function() {
|
|||||||
console.log(e);
|
console.log(e);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
socket.on("connect_error", function(e) {
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
|
||||||
socket.on("auth", function(data) {
|
socket.on("auth", function(data) {
|
||||||
var body = $("body");
|
var body = $("body");
|
||||||
var login = $("#sign-in");
|
var login = $("#sign-in");
|
||||||
|
if (!login.length) {
|
||||||
|
location.reload();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (body.hasClass("signed-out")) {
|
if (body.hasClass("signed-out")) {
|
||||||
var error = login.find(".error");
|
var error = login.find(".error");
|
||||||
error.show().closest("form").one("submit", function() {
|
error.show().closest("form").one("submit", function() {
|
||||||
@ -265,7 +273,6 @@ $(function() {
|
|||||||
"mode",
|
"mode",
|
||||||
"quit",
|
"quit",
|
||||||
].indexOf(name) !== -1) {
|
].indexOf(name) !== -1) {
|
||||||
console.log("toggle " + name);
|
|
||||||
chat.toggleClass("hide-" + name, !self.prop("checked"));
|
chat.toggleClass("hide-" + name, !self.prop("checked"));
|
||||||
}
|
}
|
||||||
}).find("input")
|
}).find("input")
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "shout",
|
"name": "shout",
|
||||||
"description": "A web IRC client",
|
"description": "A web IRC client",
|
||||||
"version": "0.22.0",
|
"version": "0.23.0",
|
||||||
"author": "Mattias Erming",
|
"author": "Mattias Erming",
|
||||||
"preferGlobal": true,
|
"preferGlobal": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
|
Loading…
Reference in New Issue
Block a user