From 788513851c042c4043f140b03fc8f19f7060e28a Mon Sep 17 00:00:00 2001 From: Mic Date: Sun, 27 Apr 2025 22:20:00 +0200 Subject: [PATCH] added visual confirmation for additional prop. see #277 #168 --- pages/customprompts/mzta-custom-prompts.html | 4 ++-- pages/customprompts/mzta-custom-prompts.js | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pages/customprompts/mzta-custom-prompts.html b/pages/customprompts/mzta-custom-prompts.html index fd787fde..ee354e67 100644 --- a/pages/customprompts/mzta-custom-prompts.html +++ b/pages/customprompts/mzta-custom-prompts.html @@ -89,14 +89,14 @@
-
__MSG_prefs_OptionText_chatgpt_web_custom_data_info__ /g/PROJECT_ID-PROJECT_NAME/project +
__MSG_prefs_OptionText_chatgpt_web_custom_data_info__ /g/PROJECT_ID-PROJECT_NAME/project
__MSG_prefs_OptionText_chatgpt_web_custom_data_info2__

-
__MSG_prefs_OptionText_chatgpt_web_custom_data_info__ /g/CUSTOM_GPT_ID +
__MSG_prefs_OptionText_chatgpt_web_custom_data_info__ /g/CUSTOM_GPT_ID
__MSG_prefs_OptionText_chatgpt_web_custom_data_info2__
diff --git a/pages/customprompts/mzta-custom-prompts.js b/pages/customprompts/mzta-custom-prompts.js index 5d0d4015..28b61333 100644 --- a/pages/customprompts/mzta-custom-prompts.js +++ b/pages/customprompts/mzta-custom-prompts.js @@ -18,7 +18,7 @@ import { prefs_default } from "../../options/mzta-options-default.js"; import { getPrompts, setDefaultPromptsProperties, setCustomPrompts, preparePromptsForExport, preparePromptsForImport } from "../../js/mzta-prompts.js"; -import { isThunderbird128OrGreater, getCustomPromptsUsedSpace, sanitizeHtml } from "../../js/mzta-utils.js"; +import { isThunderbird128OrGreater, getCustomPromptsUsedSpace, sanitizeHtml, validateCustomData_ChatGPTWeb } from "../../js/mzta-utils.js"; import { taLogger } from "../../js/mzta-logger.js"; import { getPlaceholders } from "../../js/mzta-placeholders.js"; import { textareaAutocomplete } from "../../js/mzta-placeholders-autocomplete.js"; @@ -154,6 +154,9 @@ document.addEventListener('DOMContentLoaded', async () => { var chatgptWebModelNew = document.getElementById('chatGPTWebModelNew'); var chatgptWebProjectNew = document.getElementById('chatGPTWebProjectNew'); var chatgptWebCustomGptNew = document.getElementById('chatGPTWebCustomGPTNew'); + chatgptWebModelNew.addEventListener("input", validateCustomData_ChatGPTWeb); + chatgptWebProjectNew.addEventListener("input", validateCustomData_ChatGPTWeb); + chatgptWebCustomGptNew.addEventListener("input", validateCustomData_ChatGPTWeb); selectActionNew.addEventListener('change', (e) => { if (e.target.value === "2") {