www/js/global.js

changeset 679
48f8f3fce7c0
parent 678
14322825cb3d
child 684
ccb9f24d0fe9
equal deleted inserted replaced
678:14322825cb3d 679:48f8f3fce7c0
749 url: 'includes/db_profile_mash.php' 749 url: 'includes/db_profile_mash.php'
750 }, 750 },
751 mashlist = new $.jqx.dataAdapter(mashProfileSource); 751 mashlist = new $.jqx.dataAdapter(mashProfileSource);
752 752
753 /* Websocket interface. Place "websocket.onmessage = function(evt) {}" in the user script. */ 753 /* Websocket interface. Place "websocket.onmessage = function(evt) {}" in the user script. */
754 var websocket = new WebSocket('ws://'+location.hostname+'/ws'); 754 //var websocket = new WebSocket('ws://'+location.hostname+'/ws');
755 var websocket = new ReconnectingWebSocket('ws://'+location.hostname+'/ws');
755 756
756 websocket.onopen = function(evt) { 757 websocket.onopen = function(evt) {
757 console.log('WebSocket connection opened'); 758 console.log('WebSocket connection opened');
758 $('#wsstatus').html('WebSocket open'); 759 $('#wsstatus').html('WebSocket open');
759 } 760 }

mercurial