diff --git a/source/background-scripts/context-menus.ts b/source/background-scripts/context-menus.ts index bf75481..8398085 100644 --- a/source/background-scripts/context-menus.ts +++ b/source/background-scripts/context-menus.ts @@ -4,6 +4,9 @@ import {Settings} from '../settings/settings.js'; import {updateBadge} from '../utilities/badge.js'; export async function initializeContextMenus(): Promise { + const actionContext = + import.meta.env.VITE_BROWSER === 'chromium' ? 'action' : 'browser_action'; + const contextMenus: browser.Menus.CreateCreatePropertiesType[] = [ { id: 'queue-add-new-link', @@ -13,12 +16,12 @@ export async function initializeContextMenus(): Promise { { id: 'queue-open-next-link-in-new-tab', title: 'Open next link in new tab', - contexts: ['browser_action'], + contexts: [actionContext], }, { id: 'queue-open-options-page', title: 'Open the extension page', - contexts: ['browser_action'], + contexts: [actionContext], }, ];