From 168ffd5123d53e3fc907fcd89fe067ff3d6bd9d2 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Wed, 6 Sep 2017 14:32:41 -0700 Subject: [PATCH] Hide creds on connection --- vnc_auto.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/vnc_auto.html b/vnc_auto.html index c85a3338..af4b10a4 100644 --- a/vnc_auto.html +++ b/vnc_auto.html @@ -290,10 +290,14 @@ return; // don't continue trying to connect } - var coyoteName = WebUtil.getConfigVar('name', ''); - var elm = document.getElementById('zn-download-link'); - elm.href = '/download/' + coyoteName; - elm.style.display = ''; + var coyoteName = WebUtil.getConfigVar('name', ''); + var elm = document.getElementById('zn-download-link'); + elm.href = '/download/' + coyoteName; + elm.style.display = ''; + + // Scrub the query params from the URL so that it can be safely copy/pasted + console.log("Pushing new URL. Original: " + window.location.href); + window.history.replaceState({}, document.title, window.location.pathname); rfb.connect(host, port, password, path); };