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",
"description": ""
},
"SendingPrompt": {
"message": "Sending prompt...",
"description": ""
},
"AllowedValues": {
"message": "Allowed values",
"description": ""

View file

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

View file

@ -19,7 +19,6 @@
</div>
<div id="mzta_search_banner">
<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__">
<div id="mzta_autocomplete-items-loading"><img src="../images/mzta-loading.svg" title="__MSG_Loading__"></div>
<div id="mzta_autocomplete-items"></div>

View file

@ -362,14 +362,9 @@ document.body.insertBefore(banner, document.body.firstChild);
async function sendPrompt(prompt_id, tabId){
taLog.log("sendPrompt: " + prompt_id);
document.getElementById('mzta_search_input').style.display = 'none';
document.getElementById('mzta_sending_prompt').style.display = 'block';
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'){
browser.runtime.sendMessage({command: "shortcut_do_prompt", tabId: tabId, promptId: prompt_id});
window.close();
}
}
function filterPromptsForTab(prompts_data, filtering){
// If filtering is 0, return the original array without any filters (btw it should not happen)