Added an Arc-like empty tab that represents no state. [zen.urlbar.replace-newtab to false to disable]

This commit is contained in:
mr. M
2025-02-19 17:26:30 +01:00
parent e75e8d170d
commit ebdc9368da
10 changed files with 224 additions and 92 deletions

View File

@@ -1,5 +1,5 @@
diff --git a/toolkit/content/widgets/tabbox.js b/toolkit/content/widgets/tabbox.js
index 033582a3badb65d50f58a11f8a259e28eaa04ef3..fc79b5fb64ad17c3446979aa017fffb7f8ac3467 100644
index 033582a3badb65d50f58a11f8a259e28eaa04ef3..ef634d76549f0fa4d5789e2bbfb9409f44767683 100644
--- a/toolkit/content/widgets/tabbox.js
+++ b/toolkit/content/widgets/tabbox.js
@@ -210,7 +210,7 @@
@@ -11,12 +11,21 @@ index 033582a3badb65d50f58a11f8a259e28eaa04ef3..fc79b5fb64ad17c3446979aa017fffb7
this._selectedPanel?.classList.add("deck-selected");
}
this.setAttribute("selectedIndex", val);
@@ -537,7 +537,7 @@
if (!tab) {
return;
}
- for (let otherTab of this.allTabs) {
+ for (let otherTab of ZenWorkspaces.allStoredTabs) {
if (otherTab != tab && otherTab.selected) {
otherTab._selected = false;
}
@@ -820,7 +820,7 @@
if (tab == startTab) {
return null;
}
- if (filter(tab)) {
+ if (filter(tab) && !tab.hasAttribute("zen-glance-tab")) {
+ if (filter(tab) && !tab.hasAttribute("zen-glance-tab") && !tab.hasAttribute("zen-empty-tab")) {
return tab;
}
}