Some checks failed
Python Linting / Run Ruff (push) Has been cancelled
Python Linting / Run Pylint (push) Has been cancelled
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.10, [self-hosted Linux], stable) (push) Has been cancelled
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.11, [self-hosted Linux], stable) (push) Has been cancelled
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.12, [self-hosted Linux], stable) (push) Has been cancelled
Full Comfy CI Workflow Runs / test-unix-nightly (12.1, , linux, 3.11, [self-hosted Linux], nightly) (push) Has been cancelled
Execution Tests / test (macos-latest) (push) Has been cancelled
Execution Tests / test (ubuntu-latest) (push) Has been cancelled
Execution Tests / test (windows-latest) (push) Has been cancelled
Test server launches without errors / test (push) Has been cancelled
Unit Tests / test (macos-latest) (push) Has been cancelled
Unit Tests / test (ubuntu-latest) (push) Has been cancelled
Unit Tests / test (windows-2022) (push) Has been cancelled
Includes 30 custom nodes committed directly, 7 Civitai-exclusive loras stored via Git LFS, and a setup script that installs all dependencies and downloads HuggingFace-hosted models on vast.ai. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
55 lines
1.8 KiB
JavaScript
55 lines
1.8 KiB
JavaScript
const { api } = window.comfyAPI.api;
|
|
const { app } = window.comfyAPI.app;
|
|
|
|
app.registerExtension({
|
|
name: "KJNodes.browserstatus",
|
|
setup() {
|
|
if (!app.ui.settings.getSettingValue("KJNodes.browserStatus")) {
|
|
return;
|
|
}
|
|
api.addEventListener("status", ({ detail }) => {
|
|
let title = "ComfyUI";
|
|
let favicon = "green";
|
|
let queueRemaining = detail && detail.exec_info.queue_remaining;
|
|
|
|
if (queueRemaining) {
|
|
favicon = "red";
|
|
title = `00% - ${queueRemaining} | ${title}`;
|
|
}
|
|
let link = document.querySelector("link[rel~='icon']");
|
|
if (!link) {
|
|
link = document.createElement("link");
|
|
link.rel = "icon";
|
|
document.head.appendChild(link);
|
|
}
|
|
link.href = new URL(`../${favicon}.png`, import.meta.url);
|
|
document.title = title;
|
|
});
|
|
//add progress to the title
|
|
api.addEventListener("progress", ({ detail }) => {
|
|
const { value, max } = detail;
|
|
const progress = Math.floor((value / max) * 100);
|
|
let title = document.title;
|
|
|
|
if (!isNaN(progress) && progress >= 0 && progress <= 100) {
|
|
const paddedProgress = String(progress).padStart(2, '0');
|
|
title = `${paddedProgress}% ${title.replace(/^\d+%\s/, '')}`;
|
|
}
|
|
document.title = title;
|
|
});
|
|
},
|
|
init() {
|
|
if (!app.ui.settings.getSettingValue("KJNodes.browserStatus")) {
|
|
return;
|
|
}
|
|
const pythongossFeed = app.extensions.find(
|
|
(e) => e.name === 'pysssss.FaviconStatus',
|
|
)
|
|
if (pythongossFeed) {
|
|
console.warn("KJNodes - Overriding pysssss.FaviconStatus")
|
|
pythongossFeed.setup = function() {
|
|
console.warn("Disabled by KJNodes")
|
|
};
|
|
}
|
|
},
|
|
}); |