diff --git a/README.md b/README.md index e866075c..0bcaa8e1 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,8 @@ _The language status represents the percentage of translated strings in the late - loading.io for the loading SVGs - [Fluent Design System](https://www.iconfinder.com/fluent-designsystem) for the Custom Prompts table sorting icons - [JessiGue](https://www.flaticon.com/authors/jessigue) for the show/hide icon for api key fields +- [Iconka.com](https://www.iconarchive.com/artist/iconka.html) for the autotag context menu icon +- [Icojam](https://www.iconarchive.com/artist/icojam.html) for the spam filter context menu icon
diff --git a/images/autotags.png b/images/autotags.png new file mode 100644 index 00000000..7490e48e Binary files /dev/null and b/images/autotags.png differ diff --git a/images/spamfilter.png b/images/spamfilter.png new file mode 100644 index 00000000..a068ef4e Binary files /dev/null and b/images/spamfilter.png differ diff --git a/js/mzta-utils.js b/js/mzta-utils.js index d7d28c22..81e7ac9f 100644 --- a/js/mzta-utils.js +++ b/js/mzta-utils.js @@ -25,6 +25,10 @@ export const getMenuContextDisplay = () => 'message_display_action_menu'; export const contextMenuID_AddTags = 'mzta-add-tags'; export const contextMenuID_Spamfilter = 'mzta-spamfilter'; +export const contextMenuIconsPath = { + [contextMenuID_AddTags]: 'moz-extension:images/autotags.png', + [contextMenuID_Spamfilter]: 'moz-extension:images/spamfilter.png', +}; export function getLanguageDisplayName(languageCode) { const languageDisplay = new Intl.DisplayNames([languageCode], {type: 'language'}); diff --git a/mzta-background.js b/mzta-background.js index 806ebc5b..c8ca8bfe 100644 --- a/mzta-background.js +++ b/mzta-background.js @@ -41,6 +41,7 @@ import { extractJsonObject, contextMenuID_AddTags, contextMenuID_Spamfilter, + contextMenuIconsPath, sanitizeChatGPTModelData, sanitizeChatGPTWebCustomData, stripHtmlKeepLines, @@ -946,9 +947,11 @@ function addContextMenu(menu_id) { browser.menus.create({ id: menu_id, title: browser.i18n.getMessage("context_menu_" + menu_id), - contexts: ["message_list"] + contexts: ["message_list"], + icons: contextMenuIconsPath[menu_id], }); taLog.log("Context menu added: " + menu_id); + console.log(">>>>>>> contextMenuIconsPath[menu_id]: " + contextMenuIconsPath[menu_id]); } function removeContextMenu(menu_id) {