diff options
Diffstat (limited to 'web/share/js/vnc/main.js')
-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"; |