mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-05 09:26:34 +00:00
(feat) Hide pinned tabs not in active workspace
When a new pinned tab is opened and it does not belong to the currently active workspace and is not marked as essential, it will now be hidden. This prevents pinned tabs from cluttering the tab bar when switching between workspaces. The global variable for the pinned tab manager has also been renamed from `gZenPinnedTabManager` to `_initializePinnedTabs`.
This commit is contained in:
@@ -196,6 +196,10 @@
|
||||
|
||||
gBrowser.pinTab(newTab);
|
||||
|
||||
if(newTab.getAttribute("zen-workspace-id") !== ZenWorkspaces.activeWorkspace && newTab.getAttribute("zen-essential") !== "true") {
|
||||
gBrowser.hideTab(newTab, undefined, true);
|
||||
}
|
||||
|
||||
newTab.initialize();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user