Repository navigation
The menus and contextMenus api does not work
#375
Unanswered
tstmax67
asked this question in
Issue triage
Replies: 2 comments 1 reply
1 reply
|
re the follow up, yep. glide.autocmds.create("ConfigLoaded", async () => {
browser.menus.create({
id: "example-item",
title: "My Custom Action",
contexts: ["link", "selection"],
async onclick(info, tab) {
if (!tab?.id) return;
await glide.content.execute((text: string) => {
alert(`you picked: ${text}`);
}, { tab_id: tab.id, args: [info.selectionText ?? ""] });
},
});
});
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Whenever I use the
contextmenuapi inglide.tslike this:or
then save and reload the browser, I get this error:

And this happens with any website. Also trying to print browser.menus(or contextMenus) without await returns a promise as expected but trying the same with await/then produces error saying 'menus/contextMenus is not valid object'.
All reactions