now the popup closes immediatly. see #677
This commit is contained in:
parent
28e61d7a40
commit
ca56c2d971
4 changed files with 2 additions and 16 deletions
|
|
@ -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": ""
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="mzta_search_banner">
|
<div id="mzta_search_banner">
|
||||||
<div id="_spacer_div"> </div>
|
<div id="_spacer_div"> </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>
|
||||||
|
|
|
||||||
|
|
@ -362,14 +362,9 @@ 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';
|
|
||||||
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();
|
window.close();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function filterPromptsForTab(prompts_data, filtering){
|
function filterPromptsForTab(prompts_data, filtering){
|
||||||
// If filtering is 0, return the original array without any filters (btw it should not happen)
|
// If filtering is 0, return the original array without any filters (btw it should not happen)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue