mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-08-14 02:05:21 +02:00
Merge remote-tracking branch 'upstream/beta' into beta
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
"use strict" // Opt in to a restricted variant of JavaScript
|
||||
const HEALTH_PING_INTERVAL = 5 // seconds
|
||||
const MAX_INIT_IMAGE_DIMENSION = 768
|
||||
const MIN_GPUS_TO_SHOW_SELECTION = 1
|
||||
const MIN_GPUS_TO_SHOW_SELECTION = 2
|
||||
|
||||
const IMAGE_REGEX = new RegExp('data:image/[A-Za-z]+;base64')
|
||||
|
||||
@ -1460,4 +1460,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()
|
||||
|
Reference in New Issue
Block a user