This is a revert of the code changes in commit
f796b05e42 as it served no functional
purpose.
Fragments were already respected for setting parameters, via a different
function. Thus it is unclear what that commit tried to fix. It also
complicated things by mixing the document location with the window
location.
The comment changes are useful, though, so those are kept.
This space that was added here was added to the parsed value of the
query variable. This broke any comparisons with the value, for example
"myvar=true" resulted in a value of "true ".
This was broken by f796b05e42
The commit also adds unit tests for webutil.getConfigVar() that will
detect problems like this in the future.
Passing parameters as part of the fragment could be considered
benifical from a security or privacy standpoint when compared to query
string parameters. The URL fragment parameters are not sent to the
server.
Very few browsers are left in the wild that supports modules but not
"nomodule", so let's simplify our handling a bit.
Safari 10 supports modules but not 'nomodule', this means that this
particular version of Safari will be broken. Due to this we have to
bump up the required Safari version to 11.
* Change copyright header
This updates the copyright header to say "The noVNC Authors". People
who previously had copyright listings are now under the AUTHORS file.
In order to have better control of the layout and to make the code
easier to follow. Using input type button or buttons will imply a lot of
built in styling that differs from browser to browser.
The only remaining use we had of WebUtil was getConfigVar(). Let's get
rid of that dependency and use our own, query-string-only and richly
commented version of that function. It's easier for people to get an
overview of vnc_lite if it's all in one file.
This commit removes support for the fragment, parameters can only be
passed using the query string from now on.
This is supposed to be a simple example, it shouldn't have this many
options. This commit removes the following options:
* logging - the default level 'warn' is good enough
* title - a weird thing to set from the query string anyway
* token - not used by most setups
* encrypt - looking at the URL is good enough
* repeaterID - not used by most setups
* shared - uncommon setting
* resize - not supported by most servers
Note that the removal of 'encrypt' allows us to remove logic for
establishing a default port. The default port for wss is 443 and for ws
it's 80 anyway.
Unused code, variables and unnecessary styles. The host/port check
would only have an effect if someone explicitly set them as empty in
the query string. The different colors of the status bar are not
necessary, nor is the styling of the background.
Firefox currently has a bug where it prefers the SVG icon over a
more exact size. This results in a poorly rendered, downscaled icon.
So disable the SVG icon until this has been fixed.
Firefox bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1419039
The API allowed strings to be passed from the RFB module to the
application using the disconnect reason. This caused problems since
the application didn't have control over translations for these
strings.
Most of the information being passed using this string was very
technical and not helpful to the end user. One exception to this was
the security result information regarding for example authentication
failures. The protocol allows the VNC server to pass a string
directly to the user in the security result.
So the disconnect reason is replaced by a boolean saying if the
disconnection was clean or not. And for the security result information
from the server, a new event has been added.
Instead of exposing all the internal connection states, the RFB module
will now only send events on connect and on disconnect. This makes it
simpler for the application and gets rid of the double events that were
being sent on disconnect (previously updatestate and disconnect).