closing the popup after calling the menu action, wating fro the message reponse.

This commit is contained in:
mic 2024-12-10 23:33:27 +01:00
parent 07d9395719
commit 7c1bb4db61

View file

@ -246,11 +246,15 @@ document.body.insertBefore(banner, document.body.firstChild);
}
function sendPrompt(prompt_id, tabId){
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';
browser.runtime.sendMessage({command: "shortcut_do_prompt", tabId: tabId, promptId: prompt_id});
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){