now the popup closes immediatly. see #677

This commit is contained in:
Mic 2026-04-02 00:09:00 +02:00
parent 28e61d7a40
commit ca56c2d971
4 changed files with 2 additions and 16 deletions

View file

@ -752,10 +752,6 @@
"message": "Use the current model", "message": "Use the current model",
"description": "" "description": ""
}, },
"SendingPrompt": {
"message": "Sending prompt...",
"description": ""
},
"AllowedValues": { "AllowedValues": {
"message": "Allowed values", "message": "Allowed values",
"description": "" "description": ""

View file

@ -47,10 +47,6 @@ body {
display: none; display: none;
} }
#mzta_sending_prompt{
display: none;
}
.mzta_autocomplete-item { .mzta_autocomplete-item {
padding: 4px; padding: 4px;
cursor: pointer; cursor: pointer;

View file

@ -19,7 +19,6 @@
</div> </div>
<div id="mzta_search_banner"> <div id="mzta_search_banner">
<div id="_spacer_div">&nbsp;</div> <div id="_spacer_div">&nbsp;</div>
<div id="mzta_sending_prompt"><img src="../images/mzta-loading.svg" title="__MSG_SendingPrompt__"></div>
<input type="text" id="mzta_search_input" placeholder="__MSG_SearchPrompt__"> <input type="text" id="mzta_search_input" placeholder="__MSG_SearchPrompt__">
<div id="mzta_autocomplete-items-loading"><img src="../images/mzta-loading.svg" title="__MSG_Loading__"></div> <div id="mzta_autocomplete-items-loading"><img src="../images/mzta-loading.svg" title="__MSG_Loading__"></div>
<div id="mzta_autocomplete-items"></div> <div id="mzta_autocomplete-items"></div>

View file

@ -362,13 +362,8 @@ document.body.insertBefore(banner, document.body.firstChild);
async function sendPrompt(prompt_id, tabId){ async function sendPrompt(prompt_id, tabId){
taLog.log("sendPrompt: " + prompt_id); taLog.log("sendPrompt: " + prompt_id);
document.getElementById('mzta_search_input').style.display = 'none'; browser.runtime.sendMessage({command: "shortcut_do_prompt", tabId: tabId, promptId: prompt_id});
document.getElementById('mzta_sending_prompt').style.display = 'block'; window.close();
let response = await browser.runtime.sendMessage({command: "shortcut_do_prompt", tabId: tabId, promptId: prompt_id});
// console.log(">>>>>>>>>>>>>>>>> response: " + JSON.stringify(response));
if(response.ok == '1'){
window.close();
}
} }
function filterPromptsForTab(prompts_data, filtering){ function filterPromptsForTab(prompts_data, filtering){