no more waiting for the tab to load
This commit is contained in:
parent
7d1a86c47a
commit
0750aed36e
1 changed files with 2 additions and 2 deletions
|
|
@ -157,7 +157,7 @@ async function openChatGPT(promptText, action, curr_tabId, do_custom_text = 0) {
|
||||||
const createdTab = newWindow.tabs[0];
|
const createdTab = newWindow.tabs[0];
|
||||||
|
|
||||||
// Wait for tab loaded.
|
// Wait for tab loaded.
|
||||||
await new Promise(resolve => {
|
/*await new Promise(resolve => {
|
||||||
const tabIsLoaded = tab => {
|
const tabIsLoaded = tab => {
|
||||||
return tab.status == "complete" && tab.url != "about:blank";
|
return tab.status == "complete" && tab.url != "about:blank";
|
||||||
};
|
};
|
||||||
|
|
@ -173,7 +173,7 @@ async function openChatGPT(promptText, action, curr_tabId, do_custom_text = 0) {
|
||||||
} else {
|
} else {
|
||||||
browser.tabs.onUpdated.addListener(listener);
|
browser.tabs.onUpdated.addListener(listener);
|
||||||
}
|
}
|
||||||
});
|
});*/
|
||||||
|
|
||||||
let pre_script = `let mztaStatusPageDesc="`+ browser.i18n.getMessage("prefs_status_page") +`";
|
let pre_script = `let mztaStatusPageDesc="`+ browser.i18n.getMessage("prefs_status_page") +`";
|
||||||
let mztaForceCompletionDesc="`+ browser.i18n.getMessage("chatgpt_force_completion") +`";
|
let mztaForceCompletionDesc="`+ browser.i18n.getMessage("chatgpt_force_completion") +`";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue