INNER CODE UNIT · JavaScript

createSingleTabMenus

jatinkrmalik/LLMFeeder · extension/background.js:172

async function createSingleTabMenus() {
  return withMenuLock(async () => {
    await browserAPI.contextMenus.removeAll();

    const parentMenuProps = {
      id: CONTEXT_MENU_IDS.PARENT,
      title: 'Copy to Markdown',
      contexts: PAGE_CONTEXTS
    };

    if (isFirefox) {
      parentMenuProps.icons = {
        16: 'icons/icon16.png',
        32: 'icons/icon48.png'
      };
    }

    await browserAPI.contextMenus.create(parentMenuProps);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…