Merge pull request #78 from wagesj45/codex/fix-context-menu-icon-color-in-dark-theme
Fix menu icons for dark theme
This commit is contained in:
commit
e1beb5fa35
2 changed files with 15 additions and 1 deletions
|
@ -377,6 +377,19 @@ async function clearCacheForMessages(idsInput) {
|
||||||
refreshMenuIcons();
|
refreshMenuIcons();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (browser.theme?.onUpdated) {
|
||||||
|
browser.theme.onUpdated.addListener(async () => {
|
||||||
|
if (userTheme === 'auto') {
|
||||||
|
const theme = await detectSystemTheme();
|
||||||
|
if (theme !== currentTheme) {
|
||||||
|
currentTheme = theme;
|
||||||
|
updateActionIcon();
|
||||||
|
refreshMenuIcons();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
logger.aiLog("failed to load config", { level: 'error' }, err);
|
logger.aiLog("failed to load config", { level: 'error' }, err);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
"accountsRead",
|
"accountsRead",
|
||||||
"menus",
|
"menus",
|
||||||
"scripting",
|
"scripting",
|
||||||
"tabs"
|
"tabs",
|
||||||
|
"theme"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue