diff --git a/js/mzta-utils.js b/js/mzta-utils.js index 6733f3c5..e22ac3eb 100644 --- a/js/mzta-utils.js +++ b/js/mzta-utils.js @@ -19,6 +19,7 @@ import { prefs_default, getDynamicSettingValue } from '../options/mzta-options-default.js'; const sparks_min = '1.2.0'; // Minimum version of ThunderAI-Sparks required for the add-on to work export const ChatGPTWeb_models = ['gpt-5','gpt-5-instant','gpt-5-t-mini','gpt-5-thinking']; // List of models available in ChatGPT Web +const MICZ_IT_LOCALIZED_LANGS = ['es', 'de', 'fr', 'it']; export const getMenuContextCompose = () => 'compose_action_menu'; export const getMenuContextDisplay = () => 'message_display_action_menu'; @@ -38,6 +39,12 @@ export function getLanguageDisplayName(languageCode) { return lang_string.charAt(0).toUpperCase() + lang_string.slice(1); } +export function getMiczItUrl(path) { + const lang = browser.i18n.getUILanguage().split('-')[0]; + const prefix = MICZ_IT_LOCALIZED_LANGS.includes(lang) ? `${lang}/` : ''; + return `https://micz.it/${prefix}${path}`; +} + function fixMsgHeader(msgHeader) { if (!msgHeader.bccList) { msgHeader.bccList = []; diff --git a/options/mzta-options.html b/options/mzta-options.html index 3a02a77d..fb792f86 100644 --- a/options/mzta-options.html +++ b/options/mzta-options.html @@ -20,8 +20,8 @@