|
@@ -231,7 +231,7 @@ export async function newWindow(block) {
|
|
incognito,
|
|
incognito,
|
|
state: windowState,
|
|
state: windowState,
|
|
});
|
|
});
|
|
- console.log('windowId', id);
|
|
|
|
|
|
+
|
|
this.windowId = id;
|
|
this.windowId = id;
|
|
|
|
|
|
return {
|
|
return {
|
|
@@ -270,7 +270,7 @@ export async function newTab(block) {
|
|
}
|
|
}
|
|
|
|
|
|
try {
|
|
try {
|
|
- const { updatePrevTab, url, active } = block.data;
|
|
|
|
|
|
+ const { updatePrevTab, url, active, inGroup } = block.data;
|
|
|
|
|
|
if (updatePrevTab && this.tabId) {
|
|
if (updatePrevTab && this.tabId) {
|
|
await browser.tabs.update(this.tabId, { url, active });
|
|
await browser.tabs.update(this.tabId, { url, active });
|
|
@@ -285,6 +285,23 @@ export async function newTab(block) {
|
|
this.windowId = tab.windowId;
|
|
this.windowId = tab.windowId;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (inGroup && !updatePrevTab) {
|
|
|
|
+ const options = {
|
|
|
|
+ groupId: this.tabGroupId,
|
|
|
|
+ tabIds: this.tabId,
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ if (!this.tabGroupId) {
|
|
|
|
+ options.createProperties = {
|
|
|
|
+ windowId: this.windowId,
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ chrome.tabs.group(options, (tabGroupId) => {
|
|
|
|
+ this.tabGroupId = tabGroupId;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
this.frameId = 0;
|
|
this.frameId = 0;
|
|
this.frames = await tabUpdatedListener.call(this, { id: this.tabId });
|
|
this.frames = await tabUpdatedListener.call(this, { id: this.tabId });
|
|
|
|
|