diff --git a/js/mathExpression.js b/js/mathExpression.js new file mode 100644 index 0000000..b61693c --- /dev/null +++ b/js/mathExpression.js @@ -0,0 +1,14 @@ +import { app } from "/scripts/app.js"; +import { ComfyWidgets } from "/scripts/widgets.js"; + +app.registerExtension({ + name: "pysssss.MathExpression", + init() { + const STRING = ComfyWidgets.STRING; + ComfyWidgets.STRING = function (node, inputName, inputData) { + const r = STRING.apply(this, arguments); + r.widget.dynamicPrompts = inputData?.[1].dynamicPrompts; + return r; + }; + }, +});