mirror of
https://github.com/zen-browser/components.git
synced 2025-07-07 21:09:58 +02:00
Refactor ZenGlanceManager.mjs to open new tabs in the background and skip loading, and append the new tab to the glance tabs container. Increase the delay for removing the current tab to 500ms.
This commit is contained in:
parent
893eead718
commit
ed7ce7c8d3
1 changed files with 4 additions and 2 deletions
|
@ -70,10 +70,12 @@
|
|||
console.log(url);
|
||||
const newTabOptions = {
|
||||
userContextId: currentTab.getAttribute("usercontextid") || "",
|
||||
inBackground: false,
|
||||
inBackground: true,
|
||||
skipLoading: true,
|
||||
insertTab: false,
|
||||
};
|
||||
const newTab = gBrowser.addTrustedTab(url, newTabOptions);
|
||||
document.getElementById("zen-glance-tabs").appendChild(newTab);
|
||||
this.#currentBrowser = newTab.linkedBrowser;
|
||||
this.#currentTab = newTab;
|
||||
return this.#currentBrowser;
|
||||
|
@ -147,7 +149,7 @@
|
|||
this.#currentTab?.remove();
|
||||
this.#currentBrowser = null;
|
||||
this.#currentTab = null;
|
||||
}, 300);
|
||||
}, 500);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue