From 360ff0090346fe2ead3e42d7bc39391325f8a2d3 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Tue, 21 Jul 2020 15:02:57 +0300 Subject: refactoring --- web/share/js/vnc/main.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'web/share/js/vnc') diff --git a/web/share/js/vnc/main.js b/web/share/js/vnc/main.js index 41f310b7..f28427c5 100644 --- a/web/share/js/vnc/main.js +++ b/web/share/js/vnc/main.js @@ -34,11 +34,10 @@ function __loadKvmdInfo() { let http = tools.makeRequest("GET", "/api/info", function() { if (http.readyState === 4) { if (http.status === 200) { - let port = JSON.parse(http.responseText).result.extras.vnc.port; - let host = window.location.hostname; + let vnc_port = JSON.parse(http.responseText).result.extras.vnc.port; $("vnc-text").innerHTML = ` # How to connect using the Linux terminal:
- $
vncviewer ${host}::${port} + $ vncviewer ${window.location.hostname}::${vnc_port} `; } else if (http.status === 401 || http.status === 403) { document.location.href = "/login"; -- cgit v1.2.3