summaryrefslogtreecommitdiff
path: root/web/share/js/kvm/session.js
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2019-04-25 00:18:10 +0300
committerDevaev Maxim <[email protected]>2019-04-25 00:18:10 +0300
commit73bfd715e3d83b777530252ef06e6fad702dd036 (patch)
treecfd9b297a7d8883022c65224e1ca2bd04598f971 /web/share/js/kvm/session.js
parent3d64401b111d863072c74e81e49de68885c0e084 (diff)
refactoring
Diffstat (limited to 'web/share/js/kvm/session.js')
-rw-r--r--web/share/js/kvm/session.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/share/js/kvm/session.js b/web/share/js/kvm/session.js
index 57946b56..adeb330e 100644
--- a/web/share/js/kvm/session.js
+++ b/web/share/js/kvm/session.js
@@ -43,7 +43,7 @@ function Session() {
var __setKvmdInfo = function(state) {
if (state.meta) {
- var text = JSON.stringify(state.meta, undefined, 4).replace(/ /g, "&nbsp;").replace(/\n/g, "<br>");
+ let text = JSON.stringify(state.meta, undefined, 4).replace(/ /g, "&nbsp;").replace(/\n/g, "<br>");
$("about-meta").innerHTML = `
<span class="code-comment">// The Pi-KVM metadata.<br>
// You can get this json using handle <a target="_blank" href="/kvmd/info">/kvmd/info</a>.<br>
@@ -69,10 +69,10 @@ function Session() {
$("link-led").className = "led-yellow";
$("link-led").title = "Connecting...";
- var http = tools.makeRequest("GET", "/kvmd/auth/check", function() {
+ let http = tools.makeRequest("GET", "/kvmd/auth/check", function() {
if (http.readyState === 4) {
if (http.status === 200) {
- var proto = (location.protocol === "https:" ? "wss" : "ws");
+ let proto = (location.protocol === "https:" ? "wss" : "ws");
__ws = new WebSocket(`${proto}://${location.host}/kvmd/ws`);
__ws.onopen = __wsOpenHandler;
__ws.onmessage = __wsMessageHandler;