update dropdown with detected language

This commit is contained in:
makaveli10
2023-07-28 23:17:50 +05:30
parent 7a1d6a5b77
commit df5de2b518
6 changed files with 51 additions and 0 deletions
+8
View File
@@ -101,6 +101,14 @@ async function startRecord(option) {
if (language === null) {
const data = JSON.parse(event.data);
language = data["language"];
// send message to popup.js to update dropdown
// console.log(language);
chrome.runtime.sendMessage({
action: "updateSelectedLanguage",
detectedLanguage: language,
});
return;
}