|
@@ -19,7 +19,6 @@ async function activeTab(block) {
|
|
active: true,
|
|
active: true,
|
|
url: '*://*/*',
|
|
url: '*://*/*',
|
|
};
|
|
};
|
|
- let dashboardWindowId = null;
|
|
|
|
|
|
|
|
if (BROWSER_TYPE === 'firefox') {
|
|
if (BROWSER_TYPE === 'firefox') {
|
|
tabsQuery.currentWindow = true;
|
|
tabsQuery.currentWindow = true;
|
|
@@ -35,9 +34,7 @@ async function activeTab(block) {
|
|
if (isDashboard) {
|
|
if (isDashboard) {
|
|
await browser.windows.update(browserWindow.id, {
|
|
await browser.windows.update(browserWindow.id, {
|
|
focused: false,
|
|
focused: false,
|
|
- state: 'minimized',
|
|
|
|
});
|
|
});
|
|
- dashboardWindowId = browserWindow.id;
|
|
|
|
} else if (browserWindow.focused) {
|
|
} else if (browserWindow.focused) {
|
|
windowId = browserWindow.id;
|
|
windowId = browserWindow.id;
|
|
}
|
|
}
|
|
@@ -52,7 +49,6 @@ async function activeTab(block) {
|
|
await Promise.all(
|
|
await Promise.all(
|
|
dashboardTabs.map((item) =>
|
|
dashboardTabs.map((item) =>
|
|
browser.windows.update(item.windowId, {
|
|
browser.windows.update(item.windowId, {
|
|
- state: 'minimized',
|
|
|
|
focused: false,
|
|
focused: false,
|
|
})
|
|
})
|
|
)
|
|
)
|
|
@@ -61,10 +57,6 @@ async function activeTab(block) {
|
|
tabsQuery.currentWindow = true;
|
|
tabsQuery.currentWindow = true;
|
|
}
|
|
}
|
|
|
|
|
|
- if (dashboardWindowId) {
|
|
|
|
- await browser.windows.update(dashboardWindowId, { state: 'normal' });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
const [tab] = await browser.tabs.query(tabsQuery);
|
|
const [tab] = await browser.tabs.query(tabsQuery);
|
|
if (!tab) {
|
|
if (!tab) {
|
|
throw new Error("Can't find active tab");
|
|
throw new Error("Can't find active tab");
|