From 23adcbf48fab00197e0c1059159b95eb7325689f Mon Sep 17 00:00:00 2001 From: mic Date: Sat, 22 Mar 2025 17:58:13 +0100 Subject: [PATCH] Add diff viewer functionality and related UI elements. work in progress. see #109 --- _locales/en/messages.json | 4 +++ js/mzta-chatgpt.js | 70 +++++++++++++++++++++++++++++++++++++-- mzta-background.js | 7 ++++ 3 files changed, 79 insertions(+), 2 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index b654ddf6..c380ce14 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1214,5 +1214,9 @@ "noActiveCalendar": { "message": "No active calendar found!", "description": "" + }, + "btn_show_differences": { + "message": "Show differences", + "description": "" } } \ No newline at end of file diff --git a/js/mzta-chatgpt.js b/js/mzta-chatgpt.js index 182ae6f4..d3abe0d8 100644 --- a/js/mzta-chatgpt.js +++ b/js/mzta-chatgpt.js @@ -20,7 +20,7 @@ // Some original methods derived from https://github.com/KudoAI/chatgpt.js/blob/7eb8463cd61143fa9e1d5a8ec3c14d3c1b286e54/chatgpt.js // Using a full string to inject it in the ChatGPT page to avoid any security error -export const mzta_script = ` +//export const mzta_script = ` let force_go = false; let do_force_completion = false; let current_message = null; @@ -99,7 +99,7 @@ function chatpgt_scrollToBottom () { function addCustomDiv(prompt_action,tabId,mailMessageId) { // Create