From c00b0b5f9737ea176763d4a8450fa3f5015709fd Mon Sep 17 00:00:00 2001 From: mic Date: Sat, 13 Apr 2024 00:07:25 +0200 Subject: [PATCH] correctly using a selection. fixes #22 --- messageMenu/mzta-msgmenu.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/messageMenu/mzta-msgmenu.js b/messageMenu/mzta-msgmenu.js index 892477b4..80b11f2c 100644 --- a/messageMenu/mzta-msgmenu.js +++ b/messageMenu/mzta-msgmenu.js @@ -40,11 +40,11 @@ const addAction = (curr_prompt, promptsContainer) => { let prefs = await browser.storage.sync.get({default_chatgpt_lang: getLanguageDisplayName(browser.i18n.getUILanguage())}); let chatgpt_lang = prefs.default_chatgpt_lang; - var fullPrompt = fullPrompt = curr_prompt.text + (curr_prompt.need_signature ? " " + await getDefaultSignature():"") + " " + browser.i18n.getMessage("prompt_lang") + chatgpt_lang + ". \"" + msg_text.text + "\" "; + var fullPrompt = curr_prompt.text + (curr_prompt.need_signature ? " " + await getDefaultSignature():"") + " " + browser.i18n.getMessage("prompt_lang") + chatgpt_lang + ". \"" + body_text + "\" "; switch(curr_prompt.id){ case 'prompt_translate_this': - fullPrompt = curr_prompt.text + chatgpt_lang + ". \"" + msg_text.text + "\" "; + fullPrompt = curr_prompt.text + chatgpt_lang + ". \"" + body_text + "\" "; break; case 'prompt_reply': fullPrompt += "Do not add the subject line to the response."