forked from extern/easydiffusion
Merge branch 'beta' of github.com:cmdr2/stable-diffusion-ui into beta
This commit is contained in:
commit
cd5f847b55
@ -1421,4 +1421,17 @@ document.querySelectorAll(".tab").forEach(tab => {
|
||||
})
|
||||
})
|
||||
|
||||
window.addEventListener("beforeunload", function(e) {
|
||||
const msg = "Unsaved pictures will be lost!";
|
||||
|
||||
let elementList = document.getElementsByClassName("imageTaskContainer");
|
||||
if (elementList.length != 0) {
|
||||
e.preventDefault();
|
||||
(e || window.event).returnValue = msg;
|
||||
return msg;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
createCollapsibles()
|
||||
|
Loading…
Reference in New Issue
Block a user