From 56adf5e837dada0b7353993099801017da405ce9 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Wed, 3 Nov 2021 20:06:33 -0700 Subject: [PATCH] Version 0.9.42 --- package.json | 2 +- public/scripts/meshcentral-min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index de646aab..4e0eba1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.9.41", + "version": "0.9.42", "keywords": [ "Remote Device Management", "Remote Device Monitoring", diff --git a/public/scripts/meshcentral-min.js b/public/scripts/meshcentral-min.js index 7bfe155a..3431243c 100644 --- a/public/scripts/meshcentral-min.js +++ b/public/scripts/meshcentral-min.js @@ -1 +1 @@ -var MeshServerCreateControl=function(t,e){var o={State:0,connectstate:0,pingTimer:null};return o.authCookie=e,o.xxStateChange=function(e,t){var n;o.State!=e&&(n=o.State,o.State=e,o.onStateChanged&&o.onStateChanged(o,o.State,n,t))},o.Start=function(){var e;0==o.connectstate&&(o.connectstate=0,e=window.location.protocol.replace("http","ws")+"//"+window.location.host+t+"control.ashx"+(urlargs.key?"?key="+urlargs.key:""),o.authCookie&&""!=o.authCookie&&(e+="?auth="+o.authCookie),o.socket=new WebSocket(e),o.socket.onopen=function(e){o.connectstate=1},o.socket.onmessage=o.xxOnMessage,o.socket.onclose=function(e){o.Stop(e.code)},o.xxStateChange(1,0),null!=o.pingTimer&&clearInterval(o.pingTimer),o.pingTimer=setInterval(function(){o.send({action:"ping"})},29e3))},o.Stop=function(e){o.connectstate=0,o.socket&&(o.socket.close(),delete o.socket),null!=o.pingTimer&&(clearInterval(o.pingTimer),o.pingTimer=null),o.xxStateChange(0,e)},o.xxOnMessage=function(e){var t;1==o.State&&o.xxStateChange(2);try{t=JSON.parse(e.data)}catch(e){return}if("object"==typeof t&&"pong"!=t.action){if("ping"==t.action&&o.send({action:"pong"}),"close"==t.action)return t.msg&&console.log(t.msg),void o.Stop(t.cause);1==o.trace?console.log("RECV",t):2==o.trace&&console.log("RECV",JSON.stringify(t)),o.onMessage&&o.onMessage(o,t)}},o.send=function(e){null!=o.socket&&1==o.connectstate&&("ping"!=e.action&&(1==o.trace?console.log("SEND",e):2==o.trace&&console.log("SEND",JSON.stringify(e))),o.socket.send(JSON.stringify(e)))},o} \ No newline at end of file +var MeshServerCreateControl=function(t,e){var o={State:0,connectstate:0,pingTimer:null};return o.authCookie=e,o.xxStateChange=function(e,t){var n;o.State!=e&&(n=o.State,o.State=e,o.onStateChanged&&o.onStateChanged(o,o.State,n,t))},o.Start=function(){var e;0==o.connectstate&&(o.connectstate=0,e=window.location.protocol.replace("http","ws")+"//"+window.location.host+t+"control.ashx"+(urlargs.key?"?key="+urlargs.key:""),o.authCookie&&""!=o.authCookie&&(e+="?moreargs=1"),o.socket=new WebSocket(e),o.socket.onopen=function(e){o.connectstate=1,o.authCookie&&""!=o.authCookie&&o.send({action:"urlargs",args:{auth:o.authCookie}})},o.socket.onmessage=o.xxOnMessage,o.socket.onclose=function(e){o.Stop(e.code)},o.xxStateChange(1,0),null!=o.pingTimer&&clearInterval(o.pingTimer),o.pingTimer=setInterval(function(){o.send({action:"ping"})},29e3))},o.Stop=function(e){o.connectstate=0,o.socket&&(o.socket.close(),delete o.socket),null!=o.pingTimer&&(clearInterval(o.pingTimer),o.pingTimer=null),o.xxStateChange(0,e)},o.xxOnMessage=function(e){var t;1==o.State&&o.xxStateChange(2);try{t=JSON.parse(e.data)}catch(e){return}if("object"==typeof t&&"pong"!=t.action){if("ping"==t.action&&o.send({action:"pong"}),"close"==t.action)return t.msg&&console.log(t.msg),void o.Stop(t.cause);1==o.trace?console.log("RECV",t):2==o.trace&&console.log("RECV",JSON.stringify(t)),o.onMessage&&o.onMessage(o,t)}},o.send=function(e){null!=o.socket&&1==o.connectstate&&("ping"!=e.action&&(1==o.trace?console.log("SEND",e):2==o.trace&&console.log("SEND",JSON.stringify(e))),o.socket.send(JSON.stringify(e)))},o} \ No newline at end of file