Update vnc_lite.html

fixing extra spaces
This commit is contained in:
yatru 2021-08-30 11:01:50 +02:00 committed by GitHub
parent 41b1bdc737
commit c89c719ad2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -111,19 +111,18 @@
function readQueryVariable(name, defaultValue) {
// A URL with a query parameter can look like this (But will most probably get logged on the http server):
// https://www.example.com?myqueryparam=myvalue
//
//
// For privacy (Using a hastag #, the parameters will not be sent to the server)
// the url can be requested in the following way:
// https://www.example.com#myqueryparam=myvalue&password=secreatvalue
//
//
// Even Mixing public and non public parameters will work:
// https://www.example.com?nonsecretparam=example.com#password=secreatvalue
//
//
// Note that we use location.href instead of location.search
// because Firefox < 53 has a bug w.r.t location.search
const re = new RegExp('.*[?&]' + name + '=([^&#]*)'),
match = ''.concat(document.location.href," ", window.location.hash).match(re);
match = ''.concat(document.location.href, " ", window.location.hash).match(re);
if (match) {
// We have to decode the URL since want the cleartext value