diff --git a/source/background-scripts/context-menus.ts b/source/background-scripts/context-menus.ts index c49ae8c..ad807c6 100644 --- a/source/background-scripts/context-menus.ts +++ b/source/background-scripts/context-menus.ts @@ -71,17 +71,22 @@ export async function contextClicked( let url: string | undefined; switch (id) { - case 'queue-add-new-link': + case 'queue-add-new-link': { text = info.linkText; url = info.linkUrl; break; - case 'queue-add-new-link-tab': + } + + case 'queue-add-new-link-tab': { text = tab?.title; url = info.pageUrl; break; - default: + } + + default: { console.warn(`Encountered unknown context menu ID: ${id}`); return; + } } if (url === undefined) {