fix: slash command does not work (#207)

This commit is contained in:
lencx
2023-01-15 18:02:23 +08:00
parent 4f03487a53
commit a798a8a784
9 changed files with 84 additions and 38 deletions

View File

@@ -1,6 +1,6 @@
// *** Core Script - DALL·E 2 Core ***
$(async function () {
async function init() {
const chatConf = await invoke('get_chat_conf') || {};
if (!chatConf.popup_search) return;
if (!window.FloatingUIDOM) return;
@@ -72,4 +72,13 @@ $(async function () {
});
}
});
})
}
if (
document.readyState === "complete" ||
document.readyState === "interactive"
) {
init();
} else {
document.addEventListener("DOMContentLoaded", init);
}