From e1cbcc8d9b7d7f677e085b1152cca0c323b3ad6c Mon Sep 17 00:00:00 2001 From: Bauke Date: Mon, 16 Nov 2020 22:38:44 +0100 Subject: [PATCH] Add a menu item to open the options page. --- source/background.ts | 7 +++++++ source/utilities/components/page-main.ts | 3 +++ 2 files changed, 10 insertions(+) diff --git a/source/background.ts b/source/background.ts index 3f063aa..7b41c91 100644 --- a/source/background.ts +++ b/source/background.ts @@ -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(); } }); diff --git a/source/utilities/components/page-main.ts b/source/utilities/components/page-main.ts index bcf603c..1c84a20 100644 --- a/source/utilities/components/page-main.ts +++ b/source/utilities/components/page-main.ts @@ -60,6 +60,9 @@ export function PageMain(props: MainProps): QComponent {

Opening the extension page:

Deleting queue items: