mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 09:01:54 +08:00
prevent ctrl+w kvm session
This commit is contained in:
@@ -24,6 +24,12 @@ var wm;
|
|||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
if (checkBrowser()) {
|
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();
|
wm = new WindowManager();
|
||||||
|
|
||||||
tools.setOnClick($("show-about-button"), () => wm.showWindow($("about-window")));
|
tools.setOnClick($("show-about-button"), () => wm.showWindow($("about-window")));
|
||||||
|
|||||||
Reference in New Issue
Block a user