Add a menu item to open the options page.

This commit is contained in:
Bauke 2020-11-16 22:38:44 +01:00
parent b2d92796a9
commit e1cbcc8d9b
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
2 changed files with 10 additions and 0 deletions

View File

@ -107,6 +107,11 @@ const contextMenus: Menus.CreateCreatePropertiesType[] = [
id: 'queue-open-next-link-in-new-tab',
title: 'Open next link in new tab',
contexts: ['browser_action']
},
{
id: 'queue-open-options-page',
title: 'Open the extension page',
contexts: ['browser_action']
}
];
@ -154,5 +159,7 @@ browser.contextMenus.onClicked.addListener(async (info, _tab) => {
await browser.tabs.create({active: true, url: nextItem.url});
await removeQItem(nextItem.id);
}
} else if (id === 'queue-open-options-page') {
await openOptionsPage();
}
});

View File

@ -60,6 +60,9 @@ export function PageMain(props: MainProps): QComponent {
<p>Opening the extension page:</p>
<ul>
<li>Double-click the extension icon.</li>
<li>
Right-click the extension icon and click "Open the extension page".
</li>
</ul>
<p>Deleting queue items:</p>