If a user disconnects but leaves the browser tab open, the password
input field would still contain the password for future connections.
We now clear the input field after reading the password into memory.
It wasn't working properly anymore because it expected to be triggered
by the "load". But we now register that event listener long after the
"load" event has already fired.
Many browsers, for example Chrome on Android will not allow audio to
play unless it's initiated from a user action. It is not reasonable to
display an error for this. Fixes issue #821.
Setting a style to null does restore it in FF, Chrome, Safari and Edge.
But it does not work in Internet Explorer. The proper way to restore to
default values is to set it to the empty string. This works in all
browsers. Fixes issue #808.
This commit moves the global error handler into a separate file,
so that it can catch module loading errors.
This also adds support for properly displaying error messages with
newlines in them (since the module loader may throw those)
This commit restructures many of the ES6 modules, splitting them
up to actual export multiple functions instead of a single object.
It also splits up Util into multiple sub-modules, to make it easier
to maintain.
Finally, localisation is renamed to localization.
This removes the special comment part of the ES6 module syntax,
opting to enable ES6 module syntax by default.
It also appends `.js` to all import paths to better support in-browser
loading.
`app/ui.js` had an incorrect import path which caused issues
when using the ES6 and/or CommonJS builds of noVNC.
`core/util.js` had a non-strict-compatible declaration of a variable
without a `let` or `var` (it now uses `let`).
This fixes both issues.
The element we want scrolling around is noVNC_screen, not the entire
window. This also allows us to compute the screen size without
fiddling the scrollbars on and off.
Retire the old settingsApply. This also allows UI logic to check the
state of things using the settings instead of having to look at the
values of HTML elements (we couldn't be sure if the changes were
applied yet or not).
It stopped working when we switched to textContent as it relies
on being able to add new HTML elements. Do things properly by
adding new elements via createElement().
Previously, setting `innerHTML` was used to display the statuses. These
could include content communicated from the remote VNC server, allowing
the remove VNC server to inject HTML into the noVNC page.
This commit switches all uses of `innerHTML` to use `textContent`, which
is not vulnerable to the HTML injection.
Anyone with basic knowledge of CSS will easily figure out how to
customise the appearance of the UI, so remove the burden of having
to maintain these extra style sheets.