summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mannehed <samuel@cendio.se>2018-08-16 11:38:35 +0200
committerSamuel Mannehed <samuel@cendio.se>2018-08-28 10:42:39 +0200
commitc756665e81ff486869848875f2639cc423a10251 (patch)
tree19ecbb9ea6c7708fe6acb0d954cc6df7218b5145
parent25551b6b406a9d2b3164a4f02b0b2325bb0833ac (diff)
downloadnovnc-c756665e81ff486869848875f2639cc423a10251.tar.gz
Rename functions in vnc_lite
Give them obvious names to make the code easier to understand.
-rw-r--r--vnc_lite.html12
1 files changed, 6 insertions, 6 deletions
diff --git a/vnc_lite.html b/vnc_lite.html
index a01e33d..a8d5e26 100644
--- a/vnc_lite.html
+++ b/vnc_lite.html
@@ -94,7 +94,7 @@
// When this function is called, the server requires
// credentials to authenticate
- function credentials(e) {
+ function credentialsAreRequired(e) {
// Let's create a password input
const form = document.createElement('form');
form.innerHTML = '<label></label>';
@@ -128,13 +128,13 @@
// When this function is called we have
// successfully connected to a server
- function connected(e) {
+ function connectedToServer(e) {
document.getElementById('sendCtrlAltDelButton').disabled = false;
status("Connected to " + desktopName);
}
// This function is called when we are disconnected
- function disconnected(e) {
+ function disconnectedFromServer(e) {
document.getElementById('sendCtrlAltDelButton').disabled = true;
if (e.detail.clean) {
status("Disconnected");
@@ -197,9 +197,9 @@
{ credentials: { password: password } });
// Add listeners to important events from the RFB module
- rfb.addEventListener("connect", connected);
- rfb.addEventListener("disconnect", disconnected);
- rfb.addEventListener("credentialsrequired", credentials);
+ rfb.addEventListener("connect", connectedToServer);
+ rfb.addEventListener("disconnect", disconnectedFromServer);
+ rfb.addEventListener("credentialsrequired", credentialsAreRequired);
rfb.addEventListener("desktopname", updateDesktopName);
// Set parameters that can be changed on an active connection