Update ttN.js

This commit is contained in:
TinyTerra
2025-02-16 22:59:28 +01:00
committed by GitHub
parent 95a1f66afc
commit f309ef30f4
+13 -8
View File
@@ -617,14 +617,19 @@ class TinyTerra extends EventTarget {
this.downKeys["^" + e.key.toLocaleUpperCase()] = false
}
injectTtnCss() {
const folders = ['ComfyUI_tinyterraNodes','comfyui_tinyterranodes']
folders.forEach((folder) => {
let link = document.createElement("link");
link.rel = "stylesheet";
link.type = "text/css";
link.href = `extensions/${folder}/ttN.css`;
document.head.appendChild(link);
})
const link = document.createElement("link");
link.rel = "stylesheet";
link.type = "text/css";
link.href = "extensions/ComfyUI_tinyterraNodes/ttN.css";
link.onerror = function () {
if (this.href.includes("comfyui_tinyterranodes")) {
console.error("tinyterraNodes: Failed to load CSS file. Please check nodepack folder name.");
return;
}
this.href = "extensions/comfyui_tinyterranodes/ttN.css"
}
document.head.appendChild(link);
}
}