diff options
author | Devaev Maxim <[email protected]> | 2019-04-11 02:45:42 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2019-04-11 02:45:42 +0300 |
commit | 4ed7dfb7ef69fa6d60eb57a8f0e8927d69c7bf9a (patch) | |
tree | 9e3ac92369f614914b9d430efb29e58dde1a6164 /web | |
parent | 8d12c7fda8a259251983b3f4cbf6de0f5f3f40a9 (diff) |
prevent ctrl+w kvm session
Diffstat (limited to 'web')
-rw-r--r-- | web/share/js/kvm/main.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/web/share/js/kvm/main.js b/web/share/js/kvm/main.js index 3019f980..97e3f62c 100644 --- a/web/share/js/kvm/main.js +++ b/web/share/js/kvm/main.js @@ -24,6 +24,12 @@ var wm; function main() { if (checkBrowser()) { + window.onbeforeunload = function(event) { + var text = "Are you sure you want to close Pi-KVM session?"; + event.returnValue = text; + return text; + }; + wm = new WindowManager(); tools.setOnClick($("show-about-button"), () => wm.showWindow($("about-window"))); |