mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-26 22:30:19 +08:00
Update imageFeed.js
Fix for firefox
This commit is contained in:
parent
9feb5f1a41
commit
7afd37a635
@ -88,7 +88,7 @@ app.registerExtension({
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
var newFileName = allImages[currentIndex].filename;
|
var newFileName = allImages[currentIndex].filename;
|
||||||
var newContainer = document.querySelector('div[type="container"]:has(img[filename="'+newFileName+'"])');
|
var newContainer = document.querySelector('div[type="container"] img[filename="'+newFileName+'"]').parentElement;
|
||||||
var newImg = newContainer.querySelector('img');
|
var newImg = newContainer.querySelector('img');
|
||||||
currentPopup.setAttribute("type", "removed");
|
currentPopup.setAttribute("type", "removed");
|
||||||
currentPopup.remove();
|
currentPopup.remove();
|
||||||
@ -227,7 +227,7 @@ app.registerExtension({
|
|||||||
var currentPopup = document.querySelector('div[type="popup"]');
|
var currentPopup = document.querySelector('div[type="popup"]');
|
||||||
if (currentPopup){
|
if (currentPopup){
|
||||||
var srcToSearch = allImages[currentIndex].filename;
|
var srcToSearch = allImages[currentIndex].filename;
|
||||||
var imgContainer = document.querySelector('div[type="container"]:has(img[filename="'+srcToSearch+'"])');
|
var imgContainer = document.querySelector('div[type="container"] img[filename="'+srcToSearch+'"]').parentElement;
|
||||||
var imgDelete = imgContainer.querySelector('button');
|
var imgDelete = imgContainer.querySelector('button');
|
||||||
imgDelete.click();
|
imgDelete.click();
|
||||||
}
|
}
|
||||||
@ -239,7 +239,7 @@ app.registerExtension({
|
|||||||
api.deleteImage(src_val.filename);
|
api.deleteImage(src_val.filename);
|
||||||
let newAllImages = allImages.filter(image => image.filename !== src_val.filename);
|
let newAllImages = allImages.filter(image => image.filename !== src_val.filename);
|
||||||
allImages = newAllImages;
|
allImages = newAllImages;
|
||||||
var imgContainer = document.querySelector('div[type="container"]:has(img[filename="'+src_val.filename+'"])');
|
var imgContainer = document.querySelector('div[type="container"] img[filename="'+src_val.filename+'"]').parentElement;
|
||||||
imgContainer.remove();
|
imgContainer.remove();
|
||||||
}
|
}
|
||||||
function downloadFile(url, filename) {
|
function downloadFile(url, filename) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user