mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
fix: slash command does not work (#207)
This commit is contained in:
13
src-tauri/src/scripts/dalle2.js
vendored
13
src-tauri/src/scripts/dalle2.js
vendored
@@ -1,6 +1,6 @@
|
||||
// *** Core Script - DALL·E 2 ***
|
||||
|
||||
$(function () {
|
||||
function init() {
|
||||
document.addEventListener("click", (e) => {
|
||||
const origin = e.target.closest("a");
|
||||
if (!origin || !origin.target) return;
|
||||
@@ -28,4 +28,13 @@ $(function () {
|
||||
searchInput.value = query;
|
||||
}
|
||||
}, 200)
|
||||
})
|
||||
}
|
||||
|
||||
if (
|
||||
document.readyState === "complete" ||
|
||||
document.readyState === "interactive"
|
||||
) {
|
||||
init();
|
||||
} else {
|
||||
document.addEventListener("DOMContentLoaded", init);
|
||||
}
|
||||
Reference in New Issue
Block a user