diff --git a/_locales/en/messages.json b/_locales/en/messages.json index e118faa6..aa9ce75b 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -84,6 +84,11 @@ "description": "" }, + "chatgpt_use_gpt35": { + "message": "Use GPT3.5", + "description": "" + }, + "msg_prompt_too_long": { "message": "The text you provided is too long. You need to reduce it to use ChatGPT.", "description": "" diff --git a/_locales/it/messages.json b/_locales/it/messages.json index c83b2700..8ccf6c09 100644 --- a/_locales/it/messages.json +++ b/_locales/it/messages.json @@ -84,6 +84,11 @@ "description": "" }, + "chatgpt_use_gpt35": { + "message": "Usa GPT3.5", + "description": "" + }, + "msg_prompt_too_long": { "message": "Il testo che vuoi inviare a ChatGPT รจ troppo lungo. Devi ridurlo per poter procedere.", "description": "" diff --git a/js/mzta-chatgpt.js b/js/mzta-chatgpt.js index 86f9c692..25207faf 100644 --- a/js/mzta-chatgpt.js +++ b/js/mzta-chatgpt.js @@ -21,6 +21,8 @@ // Using a full string to inject it in the ChatGPT page to avoid any security error export const mzta_script = ` +let force_go = false; + async function chatgpt_sendMsg(msg, method ='') { const textArea = document.querySelector('form textarea'), sendButton = document.querySelector('form button[class*="bottom"]'); @@ -110,10 +112,11 @@ function addCustomDiv(prompt_action,tabId) { var style = document.createElement('style'); style.innerHTML = ".mzta-header-fixed {position: fixed;bottom: 0;left: 0;height:100px;width: 100%;background-color: #333;color: white;text-align: center;padding: 10px 0;z-index: 1000;}" style.innerHTML += "body {padding-bottom: 100px;} [id^='headlessui-dialog-panel-:r']{padding-bottom: 100px;}"; - style.innerHTML += "#mzta-ok_btn {background-color: #007bff;border: none;color: white;padding: 8px 15px;text-align: center;text-decoration: none;display: inline-block;font-size: 16px;margin: 4px 2px;transition-duration: 0.4s;cursor: pointer;border-radius: 5px;}"; - style.innerHTML += "#mzta-ok_btn:hover {background-color: #0056b3;color: white;}"; + style.innerHTML += "#mzta-btn_ok {background-color: #007bff;border: none;color: white;padding: 8px 15px;text-align: center;text-decoration: none;display: inline-block;font-size: 16px;margin: 4px 2px;transition-duration: 0.4s;cursor: pointer;border-radius: 5px;}"; + style.innerHTML += "#mzta-btn_ok:hover {background-color: #0056b3;color: white;}"; style.innerHTML += "#mzta-loading{height:50px;display:inline-block;}"; - style.innerHTML += "#mzta-model_warn{max-height:100%px;min-width:30%;max-width:50%;position:absolute;top:0px;right:3px;padding:3px;border-radius:5px;text-align:center;background-color:#FFBABA;border:1px solid;font-size:13px;color:#D8000C;display:none;}"; + style.innerHTML += "#mzta-model_warn{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);max-height:100%px;min-width:30%;max-width:50%;padding:3px;border-radius:5px;text-align:center;background-color:#FFBABA;border:1px solid;font-size:13px;color:#D8000C;display:none;}"; + style.innerHTML += "#mzta-btn_gpt35 {background-color: #007bff;border: none;color: white;padding: 2px 4px;text-align: center;text-decoration: none;display: none;font-size: 13px;margin-left: 4px;transition-duration: 0.4s;cursor: pointer;border-radius: 2px;}"; // Add