Skip to content

Commit f7192e0

Browse files
committed
Add Ctrl+Alt+0 shortcut key for Expand/Collapse All Stacks
1 parent e01a7bf commit f7192e0

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

chrome/content/tabutils-st.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ tabutils._stackTabs = function() {
176176

177177
gBrowser.collapseStack = function collapseStack(aTab, aForce) {
178178
if ("length" in arguments[0]) {
179-
let aTabs = Array.filter(arguments[0], function(aTab) aTab.hasAttribute("group-selected"));
179+
let aTabs = Array.filter(arguments[0], function(aTab) aTab.getAttribute("group-counter") > 1);
180180
if (aForce == null)
181181
aForce = !aTabs.every(function(aTab) aTab.hasAttribute("group-collapsed"));
182182

chrome/content/tabutils.xul

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
<key id="key_unstackTab" key="U" modifiers="accel,alt" oncommand="gBrowser.unstackTabs([gBrowser.mCurrentTab]);"/>
6262
<key id="key_expandStack" key="+" modifiers="accel,alt" oncommand="gBrowser.collapseStack(gBrowser.isCollapsedStack(gBrowser.mCurrentTab) ? gBrowser.mCurrentTab : gBrowser.allTabs, false);"/>
6363
<key id="key_collapseStack" key="-" modifiers="accel,alt" oncommand="gBrowser.collapseStack(gBrowser.isExpandedStack(gBrowser.mCurrentTab) ? gBrowser.mCurrentTab : gBrowser.allTabs, true);"/>
64+
<key id="key_collapseAllStacks" key="0" modifiers="accel,alt" oncommand="gBrowser.collapseStack(gBrowser.allTabs);"/>
6465
<key id="key_moveTabBackward" oncommand="gBrowser.moveTabBackward();" keycode="VK_PAGE_UP" modifiers="accel,shift"/>
6566
<key id="key_moveTabForward" oncommand="gBrowser.moveTabForward();" keycode="VK_PAGE_DOWN" modifiers="accel,shift"/>
6667
<key id="key_moveTabToStart" oncommand="gBrowser.moveTabToStart();" keycode="VK_HOME" modifiers="accel,shift"/>

defaults/preferences/prefs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ pref("extensions.tabutils.shortcut.key_pinTab", true);
164164
pref("extensions.tabutils.shortcut.key_unstackTab", true);
165165
pref("extensions.tabutils.shortcut.key_expandStack", true);
166166
pref("extensions.tabutils.shortcut.key_collapseStack", true);
167+
pref("extensions.tabutils.shortcut.key_collapseAllStacks", true);
167168
pref("extensions.tabutils.shortcut.key_moveTabBackward", true);
168169
pref("extensions.tabutils.shortcut.key_moveTabForward", true);
169170
pref("extensions.tabutils.shortcut.key_moveTabToStart", true);

0 commit comments

Comments
 (0)