From 4ae0a9b371cc5fbdf1e9e24b14c1adb1613efc11 Mon Sep 17 00:00:00 2001 From: mic Date: Wed, 8 May 2024 23:46:36 +0200 Subject: [PATCH] added a button to force the completion --- _locales/en/messages.json | 10 ++++++++++ _locales/it/messages.json | 10 ++++++++++ js/mzta-chatgpt.js | 14 +++++++++++++- mzta-background.js | 2 ++ 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index be1df206..7f30c614 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -89,6 +89,16 @@ "description": "" }, + "chatgpt_force_completion": { + "message": "force completion", + "description": "" + }, + + "chatgpt_force_completion_title": { + "message": "Click here to display the 'Use last answer' button if ChatGPT has finished its work but the button has not appeared.", + "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 dacedcad..2447deeb 100644 --- a/_locales/it/messages.json +++ b/_locales/it/messages.json @@ -89,6 +89,16 @@ "description": "" }, + "chatgpt_force_completion": { + "message": "forza il completamento", + "description": "" + }, + + "chatgpt_force_completion_title": { + "message": "Fai clic qui per visualizzare il pulsante 'Usa l'ultima risposta' se ChatGPT ha terminato il suo lavoro ma il pulsante non è apparso.", + "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 54d325e4..b11f53e5 100644 --- a/js/mzta-chatgpt.js +++ b/js/mzta-chatgpt.js @@ -119,7 +119,8 @@ function addCustomDiv(prompt_action,tabId) { 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;}"; style.innerHTML += "#mzta-status-page{position:fixed;bottom:0;left:0;padding-left:5px;font-size:13px;font-style:italic;text-decoration:underline;color:#919191;}"; - style.innerHTML += "#mzta-status-page:hover{color:#007bff;}"; + style.innerHTML += "#mzta-force-completion{cursor:pointer;position:fixed;bottom:0;right:0;padding-right:5px;font-size:13px;font-style:italic;text-decoration:underline;color:#919191;}"; + style.innerHTML += "#mzta-status-page:hover, #mzta-force-completion:hover{color:#007bff;}"; // Add