summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/share/js/kvm/main.js6
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")));