diff options
author | Devaev Maxim <[email protected]> | 2020-07-21 15:02:57 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-07-21 15:27:14 +0300 |
commit | 360ff0090346fe2ead3e42d7bc39391325f8a2d3 (patch) | |
tree | 27de4c274acfe1abcc3df6b94d123a2cbb0fd03f /web/share/js/vnc | |
parent | b5ba546481dffa687395df725fb4dd57c7dc8338 (diff) |
refactoring
Diffstat (limited to 'web/share/js/vnc')
-rw-r--r-- | web/share/js/vnc/main.js | 5 |
1 files changed, 2 insertions, 3 deletions
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 = ` <span class="code-comment"># How to connect using the Linux terminal:<br> - $</span> vncviewer ${host}::${port} + $</span> vncviewer ${window.location.hostname}::${vnc_port} `; } else if (http.status === 401 || http.status === 403) { document.location.href = "/login"; |