From 235ee26533130dd3b732c22bba49d4b796a7f194 Mon Sep 17 00:00:00 2001 From: Mic Date: Fri, 13 Dec 2024 00:38:00 +0100 Subject: [PATCH] fixed prompts numbering in the compose window menu --- popup/mzta-popup.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/popup/mzta-popup.js b/popup/mzta-popup.js index 9d6faa2f..30f10b2a 100644 --- a/popup/mzta-popup.js +++ b/popup/mzta-popup.js @@ -22,6 +22,7 @@ let menuSendImmediately = false; let taLog = console; let connection_type = 'chatgpt_web'; let add_tags = false; +let tabType; document.addEventListener('DOMContentLoaded', async () => { let prefs = await browser.storage.sync.get({do_debug: false, dynamic_menu_force_enter: false, add_tags: false, connection_type: 'chatgpt_web'}); @@ -30,7 +31,7 @@ document.addEventListener('DOMContentLoaded', async () => { let reponse = await browser.runtime.sendMessage({command: "popup_menu_ready"}); taLog.log("Preparing data to load the popup menu: " + JSON.stringify(reponse)); let tabId = reponse.lastShortcutTabId; - let tabType = reponse.lastShortcutTabType; + tabType = reponse.lastShortcutTabType; let filtering = reponse.lastShortcutFiltering; let _prompts_data = reponse.lastShortcutPromptsData; taLog.log("_prompts_data: " + JSON.stringify(_prompts_data)); @@ -284,7 +285,7 @@ function filterPromptsForTab(prompts_data, filtering){ } function checkDoAddTags(){ - return add_tags && (connection_type !== "chatgpt_web"); + return add_tags && (connection_type !== "chatgpt_web" && tabType !== 'messageCompose'); } function ensurePromptAddTagsFirst(arr) {