mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
chore: dalle2
This commit is contained in:
11
src-tauri/src/assets/dalle2.js
vendored
11
src-tauri/src/assets/dalle2.js
vendored
@@ -10,6 +10,16 @@ async function init() {
|
||||
// const searchBtn = document.querySelector('.image-prompt-form-wrapper form .image-prompt-btn');
|
||||
const searchInput = document.querySelector('.image-prompt-form-wrapper form>.text-input');
|
||||
if (searchInput) {
|
||||
document.addEventListener("click", (e) => {
|
||||
const origin = e.target.closest("a");
|
||||
if (origin && origin.href && origin.target !== '_self') {
|
||||
invoke('open_link', { url: origin.href });
|
||||
}
|
||||
});
|
||||
|
||||
clearInterval(window.searchInterval);
|
||||
|
||||
if (!window.__CHATGPT_QUERY__) return;
|
||||
const query = decodeURIComponent(window.__CHATGPT_QUERY__);
|
||||
searchInput.focus();
|
||||
searchInput.value = query;
|
||||
@@ -19,7 +29,6 @@ async function init() {
|
||||
// searchBtn.classList.add('active-style');
|
||||
// searchBtn.removeAttribute('disabled');
|
||||
// searchBtn.classList.remove('btn-disabled', 'btn-disabled-style');
|
||||
clearInterval(window.searchInterval);
|
||||
}
|
||||
}, 200)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user