From f489e65483d63b8c93e32176a0c43da0860e0385 Mon Sep 17 00:00:00 2001 From: Mic Date: Thu, 29 Jan 2026 23:36:00 +0100 Subject: [PATCH] correctly adding context menu item for summarize when activating the feature. fixes #626 --- mzta-background.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mzta-background.js b/mzta-background.js index 1f009330..d7a6f629 100644 --- a/mzta-background.js +++ b/mzta-background.js @@ -885,6 +885,7 @@ function setupStorageChangeListener() { if(newConnectionType === "chatgpt_web"){ removeContextMenu(contextMenuID_AddTags); removeContextMenu(contextMenuID_Spamfilter); + removeContextMenu(contextMenuID_Summarize); } addContextMenuItems(); } @@ -924,11 +925,9 @@ function setupStorageChangeListener() { } if (changes.summarize) { if (changes.summarize.newValue){ - if (prefs_init.summarize){ - addContextMenu(contextMenuID_Summarize); - } + addContextMenu(contextMenuID_Summarize); } else { - removeContextMenu(contextMenuID_Summarize); + removeContextMenu(contextMenuID_Summarize); } } reload_pref_init(); @@ -993,7 +992,7 @@ function addContextMenuItems() { } // Add Context menu: Summarize - if(prefs_init.summarize && checkAPIIntegration(prefs_init.connection_type && prefs_init.summarize_use_specific_integration, prefs_init.summarize_connection_type)) { + if(prefs_init.summarize && checkAPIIntegration(prefs_init.connection_type, prefs_init.summarize_use_specific_integration, prefs_init.summarize_connection_type)) { addContextMenu(contextMenuID_Summarize); } }