mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
chore: allowlist
This commit is contained in:
7
src-tauri/src/scripts/cmd.js
vendored
7
src-tauri/src/scripts/cmd.js
vendored
@@ -166,6 +166,7 @@ async function cmdTip() {
|
||||
// Enter a command starting with `/` and press a space to automatically fill `chatgpt prompt`.
|
||||
// If more than one command appears in the search results, the first one will be used by default.
|
||||
function cmdKeydown(event) {
|
||||
|
||||
if (!window.__CHAT_MODEL_CMD_PROMPT__) {
|
||||
return;
|
||||
}
|
||||
@@ -245,8 +246,14 @@ async function cmdTip() {
|
||||
searchInput.value = window.__CHAT_MODEL_CMD_PROMPT__;
|
||||
|
||||
initDom();
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
if (event.keyCode === 13 && __TAURI_METADATA__.__currentWindow.label === 'tray') {
|
||||
const btn = document.querySelector('form button');
|
||||
if (btn) btn.click();
|
||||
}
|
||||
}
|
||||
searchInput.removeEventListener('keydown', cmdKeydown, { capture: true });
|
||||
searchInput.addEventListener('keydown', cmdKeydown, { capture: true });
|
||||
|
||||
1
src-tauri/src/scripts/export.js
vendored
1
src-tauri/src/scripts/export.js
vendored
@@ -1,6 +1,7 @@
|
||||
// *** Core Script - Export ***
|
||||
|
||||
async function init() {
|
||||
if (window.location.pathname === '/auth/login') return;
|
||||
const buttonOuterHTMLFallback = `<button class="btn flex justify-center gap-2 btn-neutral" id="download-png-button">Try Again</button>`;
|
||||
removeButtons();
|
||||
if (window.buttonsInterval) {
|
||||
|
||||
Reference in New Issue
Block a user