From 8af1cc5809414f50e2e9083c440c24e82c6bc2b4 Mon Sep 17 00:00:00 2001 From: mic Date: Fri, 5 Apr 2024 00:39:03 +0200 Subject: [PATCH] No subject line in the message reply. Fixes #17 --- messageMenu/mzta-msgmenu.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/messageMenu/mzta-msgmenu.js b/messageMenu/mzta-msgmenu.js index 0ce00890..3593a13a 100644 --- a/messageMenu/mzta-msgmenu.js +++ b/messageMenu/mzta-msgmenu.js @@ -42,8 +42,15 @@ const addAction = (curr_prompt, promptsContainer) => { var fullPrompt = fullPrompt = curr_prompt.text + (curr_prompt.need_signature ? " " + await getDefaultSignature():"") + " " + browser.i18n.getMessage("prompt_lang") + chatgpt_lang + ". \"" + msg_text.text + "\" "; - if(curr_prompt.id == 'prompt_translate_this'){ - fullPrompt = curr_prompt.text + chatgpt_lang + ". \"" + msg_text.text + "\" "; + switch(curr_prompt.id){ + case 'prompt_translate_this': + fullPrompt = curr_prompt.text + chatgpt_lang + ". \"" + msg_text.text + "\" "; + break; + case 'prompt_reply': + fullPrompt += "Do not add the subject line to the response." + break; + default: + break; } const tabs = await browser.tabs.query({ active: true, currentWindow: true });