Skip to content

Commit bd44b78

Browse files
committed
fix tab group behaviour
1 parent 1191bf9 commit bd44b78

File tree

1 file changed

+10
-10
lines changed
  • src/browseraction/components/logic

1 file changed

+10
-10
lines changed

src/browseraction/components/logic/load.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ export const loadSites = async (
6161
lines = shuffle(lines)
6262
}
6363

64+
if (selectedContainerId === NEW_CONTAINER_ID) {
65+
selectedContainerId = (
66+
await browser.contextualIdentities.create({
67+
name: 'OMU ' + new Date().toLocaleString(),
68+
color: CONTAINER_COLORS[Math.floor(Math.random() * CONTAINER_COLORS.length)],
69+
icon: 'circle'
70+
})
71+
).cookieStoreId
72+
}
73+
6474
const createdTabs: browser.Tabs.Tab[] = []
6575
for (let i = 0; i < lines.length; i++) {
6676
const line = lines[i].trim()
@@ -80,16 +90,6 @@ export const loadSites = async (
8090
url = browser.runtime.getURL('lazyloading.html#') + url
8191
}
8292

83-
if (selectedContainerId === NEW_CONTAINER_ID) {
84-
selectedContainerId = (
85-
await browser.contextualIdentities.create({
86-
name: 'OMU ' + new Date().toLocaleString(),
87-
color: CONTAINER_COLORS[Math.floor(Math.random() * CONTAINER_COLORS.length)],
88-
icon: 'circle'
89-
})
90-
).cookieStoreId
91-
}
92-
9393
const tabCreateProperties: browser.Tabs.CreateCreatePropertiesType = {
9494
url: isSearchQuery ? 'about:blank' : url,
9595
active: false

0 commit comments

Comments
 (0)