autotag and spamfilter context menu icons added

This commit is contained in:
Mic 2025-09-10 00:35:00 +02:00
parent edf2de4c34
commit f77d1dabe5
5 changed files with 10 additions and 1 deletions

View file

@ -102,6 +102,8 @@ _The language status represents the percentage of translated strings in the late
- <a href="https://loading.io">loading.io</a> 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
<br>

BIN
images/autotags.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
images/spamfilter.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -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'});

View file

@ -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) {