Files
Bjornulf_custom_nodes/web/js/random_line_from_input.js
2024-08-12 11:55:41 +02:00

15 lines
439 B
JavaScript

import { app } from "../../../scripts/app.js";
app.registerExtension({
name: "Bjornulf.RandomLineFromInput",
async nodeCreated(node) {
if (node.comfyClass === "Bjornulf_RandomLineFromInput") {
// Set seed widget to hidden input
const seedWidget = node.widgets.find(w => w.name === "seed");
if (seedWidget) {
seedWidget.type = "HIDDEN";
}
}
}
});