Skip to content

Commit a393e3f

Browse files
committed
Add Ctrl+Alt+U shortcut key for Unstack Tab
1 parent 5646d3b commit a393e3f

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

chrome/content/tabutils-st.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ tabutils._stackTabs = function() {
8989

9090
gBrowser.unstackTabs = function unstackTabs(aTabs, aMove) {
9191
aMove = aMove != false;
92-
for (let i = 0; i < aTabs.length; i++) {
93-
if (aTabs[i].hasAttribute("group-first"))
94-
this.detachTab(aTabs[i]);
95-
}
9692
for (let i = aTabs.length - 1; i >= 0; i--)
9793
this.detachTab(aTabs[i], aMove);
9894
};
@@ -156,7 +152,7 @@ tabutils._stackTabs = function() {
156152
if (!aTab.hasAttribute("group"))
157153
return;
158154

159-
if (aMove && !aTab.hasAttribute("group-first") && !aTab.hasAttribute("group-last")) {
155+
if (aMove && !aTab.hasAttribute("group-last")) {
160156
aTab._suppressTabMove = true;
161157
this.moveTabAfter(aTab, this.lastSiblingTabOf(aTab));
162158
this.mTabContainer._notifyBackgroundTab(aTab);

chrome/content/tabutils.xul

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
<key id="key_freezeTab" key="F" modifiers="accel,alt" oncommand="gBrowser.freezeTab(gBrowser.mCurrentTab);"/>
5959
<key id="key_faviconizeTab" key="I" modifiers="accel,alt" oncommand="gBrowser.faviconizeTab(gBrowser.mCurrentTab);"/>
6060
<key id="key_pinTab" key="P" modifiers="accel,alt" oncommand="gBrowser.pinTab(gBrowser.mCurrentTab, !gBrowser.mCurrentTab.pinned);"/>
61+
<key id="key_unstackTab" key="U" modifiers="accel,alt" oncommand="gBrowser.unstackTabs([gBrowser.mCurrentTab]);"/>
6162
<key id="key_moveTabBackward" oncommand="gBrowser.moveTabBackward();" keycode="VK_PAGE_UP" modifiers="accel,shift"/>
6263
<key id="key_moveTabForward" oncommand="gBrowser.moveTabForward();" keycode="VK_PAGE_DOWN" modifiers="accel,shift"/>
6364
<key id="key_moveTabToStart" oncommand="gBrowser.moveTabToStart();" keycode="VK_HOME" modifiers="accel,shift"/>
@@ -262,6 +263,7 @@
262263
<menuitem id="context_unstackTab"
263264
label="&unstackTab.label;"
264265
accesskey="&unstackTab.accesskey;"
266+
key="key_unstackTab"
265267
insertbefore="context_closeTab"
266268
multiselected="any"
267269
grouponly="true"

defaults/preferences/prefs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ pref("extensions.tabutils.shortcut.key_lockTab", true);
161161
pref("extensions.tabutils.shortcut.key_freezeTab", true);
162162
pref("extensions.tabutils.shortcut.key_faviconizeTab", true);
163163
pref("extensions.tabutils.shortcut.key_pinTab", true);
164+
pref("extensions.tabutils.shortcut.key_unstackTab", true);
164165
pref("extensions.tabutils.shortcut.key_moveTabBackward", true);
165166
pref("extensions.tabutils.shortcut.key_moveTabForward", true);
166167
pref("extensions.tabutils.shortcut.key_moveTabToStart", true);

0 commit comments

Comments
 (0)