open list manager in new tab

This commit is contained in:
2026-02-06 15:54:24 +03:00
parent 52ef7b51dc
commit 24aca05575
3 changed files with 7 additions and 23 deletions

View File

@@ -8,8 +8,7 @@
"contextMenus",
"scripting",
"storage",
"tabs",
"windows"
"tabs"
],
"host_permissions": [
"<all_urls>"

View File

@@ -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();

View File

@@ -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<void> {
await chrome.tabs.create({ url: chrome.runtime.getURL('list-manager/list-manager.html') });
}
private setupStorageSync(): void {