(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:
Kristijan Ribarić
2024-11-19 22:06:23 +01:00
parent 95ff7afa98
commit 38e09d84fd

View File

@@ -196,6 +196,10 @@
gBrowser.pinTab(newTab); gBrowser.pinTab(newTab);
if(newTab.getAttribute("zen-workspace-id") !== ZenWorkspaces.activeWorkspace && newTab.getAttribute("zen-essential") !== "true") {
gBrowser.hideTab(newTab, undefined, true);
}
newTab.initialize(); newTab.initialize();
} }