Check if the webui is reloading or being manually closed
Check for the Reloading... textpull/1/head
parent
6ea33f4a06
commit
62e01aa48a
|
|
@ -1,3 +1,7 @@
|
|||
window.addEventListener('beforeunload', (event) => {
|
||||
event.returnValue = 'Are you sure you want to leave Webui?';
|
||||
});
|
||||
if (document.body.innerHTML.includes('Reloading...')) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.returnValue = 'Are you sure you want to leave Webui?';
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue