correctly checking do_custom_text. see #96

This commit is contained in:
mic 2024-07-30 21:50:15 +02:00
parent 4fdd7d3dc2
commit f8a8413955

View file

@ -89,7 +89,7 @@ browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
//console.log(">>>>>>>>>>>>> controller.js onMessage: " + JSON.stringify(message)); //console.log(">>>>>>>>>>>>> controller.js onMessage: " + JSON.stringify(message));
if (message.command === "chatgpt_send") { if (message.command === "chatgpt_send") {
//send the received prompt to the chatgpt api //send the received prompt to the chatgpt api
if(message.do_custom_text) { if(message.do_custom_text=="1") {
let userInput = prompt(browser.i18n.getMessage("chatgpt_win_custom_text")); let userInput = prompt(browser.i18n.getMessage("chatgpt_win_custom_text"));
if(userInput !== null) { if(userInput !== null) {
message.prompt += " " + userInput; message.prompt += " " + userInput;