summaryrefslogtreecommitdiff
path: root/public/join.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/join.js')
-rw-r--r--public/join.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/public/join.js b/public/join.js
index 24e10ab..eef3833 100644
--- a/public/join.js
+++ b/public/join.js
@@ -68,11 +68,14 @@ function start_event_source() {
});
evtsrc.addEventListener("deleted", function (evt) {
console.log("DELETED");
- window.location.href = '/info/' + game.title_id;
+ window.location.href = '/' + game.title_id;
});
evtsrc.onerror = function (err) {
window.message.innerHTML = "Disconnected from server...";
};
+ window.addEventListener('beforeunload', function (evt) {
+ evtsrc.close();
+ });
}
}