close websocket before unload

This commit is contained in:
Seven Du 2013-06-04 10:23:23 +08:00
parent d92074233c
commit 811a99e0f0
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) {