custom_nodes / ComfyUI-Impact-Pack /js /impact-wildcard.js
gartajackhats1985's picture
Upload 171 files
c37b2dd verified
raw
history blame contribute delete
604 Bytes
import { ComfyApp, app } from "../../scripts/app.js";
import { api } from "../../scripts/api.js";
let refresh_btn = document.getElementById('comfy-refresh-button');
let refresh_btn2 = document.querySelector('button[title="Refresh widgets in nodes to find new models or files"]');
let orig = refresh_btn.onclick;
if(refresh_btn) {
refresh_btn.onclick = function() {
orig();
api.fetchApi('/impact/wildcards/refresh');
};
}
if(refresh_btn2) {
refresh_btn2?.addEventListener('click', function() {
api.fetchApi('/impact/wildcards/refresh');
});
}