mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-08-15 23:50:05 +08:00
25 lines
829 B
JavaScript
Vendored
25 lines
829 B
JavaScript
Vendored
import { app } from "/scripts/app.js";
|
||
|
||
app.registerExtension({
|
||
name: "SendToLoadImage",
|
||
async nodeCreated(node) {
|
||
if (node.comfyClass === "SaveImage") {
|
||
node.onExecuted = (output) => {
|
||
if (!output?.images) return;
|
||
|
||
// Crée un bouton une seule fois
|
||
if (!node.sendBtn) {
|
||
const btn = document.createElement("button");
|
||
btn.innerText = "Send To...";
|
||
btn.style.margin = "5px";
|
||
btn.onclick = () => {
|
||
alert("Ici tu pourras choisir vers quel TaggedLoadImage envoyer l’image");
|
||
};
|
||
node.addDOMElement(btn);
|
||
node.sendBtn = btn;
|
||
}
|
||
};
|
||
}
|
||
}
|
||
});
|