diff --git a/manifest.json b/manifest.json index bfa2136..df2bada 100644 --- a/manifest.json +++ b/manifest.json @@ -8,8 +8,7 @@ "contextMenus", "scripting", "storage", - "tabs", - "windows" + "tabs" ], "host_permissions": [ "" @@ -26,4 +25,4 @@ "48": "icons/icon48.png", "128": "icons/icon128.png" } -} +} \ No newline at end of file diff --git a/src/background.ts b/src/background.ts index 42c87f0..41b7225 100644 --- a/src/background.ts +++ b/src/background.ts @@ -41,22 +41,13 @@ class BackgroundService { } private setupContextMenu(): void { - chrome.contextMenus.onClicked.addListener((info) => { + chrome.contextMenus.onClicked.addListener(async (info) => { if (info.menuItemId === 'manage-lists') { - this.openListManagerWindow(); + await chrome.tabs.create({ url: chrome.runtime.getURL('list-manager/list-manager.html') }); } }); } - private openListManagerWindow(): void { - chrome.windows.create({ - url: chrome.runtime.getURL('list-manager/list-manager.html'), - type: 'popup', - width: 1280, - height: 700, - focused: true - }); - } } new BackgroundService(); diff --git a/src/popup/PopupController.ts b/src/popup/PopupController.ts index 0094d16..9ebed56 100644 --- a/src/popup/PopupController.ts +++ b/src/popup/PopupController.ts @@ -215,7 +215,7 @@ export class PopupController { // Manage lists document.getElementById('manageListsBtn')?.addEventListener('click', () => { - this.openListManagerWindow(); + void this.openListManager(); }); // Color picker text inputs sync @@ -941,14 +941,8 @@ export class PopupController { MessageService.sendToAllTabs({ type: 'WORD_LIST_UPDATED' }); } - private openListManagerWindow(): void { - chrome.windows.create({ - url: chrome.runtime.getURL('list-manager/list-manager.html'), - type: 'popup', - width: 1280, - height: 700, - focused: true - }); + private async openListManager(): Promise { + await chrome.tabs.create({ url: chrome.runtime.getURL('list-manager/list-manager.html') }); } private setupStorageSync(): void {