forked from DGNum/gestioCOF
Add strict mode to history.html script
This commit is contained in:
parent
b8a307b4a6
commit
fa64a68378
1 changed files with 3 additions and 2 deletions
|
@ -63,6 +63,7 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
'use strict';
|
||||
|
||||
// Lock to avoid multiple requests
|
||||
window.lock = 0;
|
||||
|
@ -138,12 +139,12 @@ $(document).ready(function() {
|
|||
// Synchronization
|
||||
// -----
|
||||
|
||||
websocket_msg_default = {'opegroups':[],'opes':[]}
|
||||
var websocket_msg_default = {'opegroups':[],'opes':[]}
|
||||
|
||||
var websocket_protocol = window.location.protocol == 'https:' ? 'wss' : 'ws';
|
||||
var location_host = window.location.host;
|
||||
var location_url = window.location.pathname.startsWith('/gestion/') ? location_host + '/gestion' : location_host;
|
||||
socket = new ReconnectingWebSocket(websocket_protocol+"://" + location_url + "/ws/k-fet/k-psul/");
|
||||
var socket = new ReconnectingWebSocket(websocket_protocol+"://" + location_url + "/ws/k-fet/k-psul/");
|
||||
socket.onmessage = function(e) {
|
||||
data = $.extend({}, websocket_msg_default, JSON.parse(e.data));
|
||||
history.update_data(data);
|
||||
|
|
Loading…
Reference in a new issue