Add context menus to action button in Chromium.
This commit is contained in:
parent
dcf395f01d
commit
bdb06a1b15
|
@ -4,6 +4,9 @@ import {Settings} from '../settings/settings.js';
|
|||
import {updateBadge} from '../utilities/badge.js';
|
||||
|
||||
export async function initializeContextMenus(): Promise<void> {
|
||||
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<void> {
|
|||
{
|
||||
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],
|
||||
},
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in New Issue