just catching up

This commit is contained in:
Jordan Wages 2025-07-06 04:31:51 -05:00
commit 254f0c5ffc
2 changed files with 16 additions and 2 deletions

View file

@ -369,7 +369,22 @@ async function clearCacheForMessages(idsInput) {
icons: { "16": "resources/img/brain.png" }
});
//for the love of god work please
browser.messageDisplayAction.onClicked.addListener(async (tab, info) => {
try {
let header = await browser.messageDisplay.getDisplayedMessages();
if (!header) {
logger.aiLog("No header, no message loaded?", { debug: true });
return;
}
const url = browser.runtime.getURL(`details.html?mid=${header.id}`);
await browser.messageDisplayAction.setPopup({ tabId: tab.id, popup: url });
await browser.messageDisplayAction.openPopup({ tabId: tab.id });
} catch (err) {
logger.aiLog("Failed to open details popup", { debug: true });
}
});
browser.menus.onClicked.addListener(async (info, tab) => {
if (info.menuItemId === "apply-ai-rules-list" || info.menuItemId === "apply-ai-rules-display") {

View file

@ -24,8 +24,7 @@
"message_display_action": {
"default_icon": "resources/img/brain.png",
"default_title": "Details",
"default_label": "Details",
"default_popup": "details.html"
"default_label": "Details"
},
"background": { "scripts": [ "background.js" ] },
"options_ui": {