Skip to content

Commit

Permalink
Merge pull request #1 from yatru/yatru-disconnect_message-confirmation
Browse files Browse the repository at this point in the history
Adding disconnect_message Confirmation (Issue novnc#1502)
  • Loading branch information
yatru committed Sep 3, 2021
2 parents fcb9582 + ce61d2d commit a78361c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/ui.js
Expand Up @@ -1047,6 +1047,10 @@ const UI = {
},

disconnect() {
// When parameter disconnect_message is set, it will show a message to confirm the disconection being its value the text on the confirm dialog
if (WebUtil.getConfigVar('disconnect_message', false) && confirm( WebUtil.getConfigVar('disconnect_message') ) == false ) {
return;
}
UI.rfb.disconnect();

UI.connected = false;
Expand Down

0 comments on commit a78361c

Please sign in to comment.