just catching up
This commit is contained in:
parent
713a75eaae
commit
254f0c5ffc
2 changed files with 16 additions and 2 deletions
|
@ -369,7 +369,22 @@ async function clearCacheForMessages(idsInput) {
|
||||||
icons: { "16": "resources/img/brain.png" }
|
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) => {
|
browser.menus.onClicked.addListener(async (info, tab) => {
|
||||||
if (info.menuItemId === "apply-ai-rules-list" || info.menuItemId === "apply-ai-rules-display") {
|
if (info.menuItemId === "apply-ai-rules-list" || info.menuItemId === "apply-ai-rules-display") {
|
||||||
|
|
|
@ -24,8 +24,7 @@
|
||||||
"message_display_action": {
|
"message_display_action": {
|
||||||
"default_icon": "resources/img/brain.png",
|
"default_icon": "resources/img/brain.png",
|
||||||
"default_title": "Details",
|
"default_title": "Details",
|
||||||
"default_label": "Details",
|
"default_label": "Details"
|
||||||
"default_popup": "details.html"
|
|
||||||
},
|
},
|
||||||
"background": { "scripts": [ "background.js" ] },
|
"background": { "scripts": [ "background.js" ] },
|
||||||
"options_ui": {
|
"options_ui": {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue