close websocket before unload

This commit is contained in:
Seven Du 2013-06-04 10:23:23 +08:00 committed by Travis Cross
parent 0d31ccd62d
commit 1c9b22793a
1 changed files with 6 additions and 0 deletions

View File

@ -626,6 +626,12 @@
-->
<script type="text/javascript">
$(window).on('beforeunload', function() {
if (socket) {
socket.close();
}
});
function auto_update_calls() {
var x = $('#auto_update_calls')[0];
if (typeof x != "undefined" && x.checked) {