I love the new context menus and to use Chatgpt to make the code for them. Even though it struggle a lot in the beginning to understand the correct values.
One thing im trying to do is to make a menu for screenshot where i have a bunch of named trigger screenshots that goes to different folders. But if I want to use it for technical reason it closes open menus in apps when opening.
I tried all 3 menu types and tried to add menu level 3 as in floating window web views that work fine without interrupting open menus. I like the compact contextmenu option the best.
async function showMenu() {
const items = [
{ title: "Clipboard", icon: "sfsymbol::doc.on.clipboard", action: "named::Clipboard" },
{ title: "Work", icon: "sfsymbol::folder", action: "named::Work" },
{ title: "Interesting", icon: "sfsymbol::lightbulb", action: "named::Interesting" },
{ title: "Kvitto", icon: "sfsymbol::doc.text", action: "named::KvittoPDF" },
{ title: "Save", icon: "sfsymbol::square.and.arrow.down", action: "named::Save" },
{ title: "Fun", icon: "sfsymbol::sparkles", action: "named::Fun" },
{ title: "Clothes", icon: "sfsymbol::tshirt", action: "named::Clothes" },
{ title: "IT", icon: "sfsymbol::desktopcomputer", action: "named::IT" }
];
const container = {
type: "floatingmenu",
items: items,
BTTMenuWindowLevel: 3,
BTTMenuStealKeyboardFocusOnShow: 1
};
return JSON.stringify(container);
}
showMenu();