mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 22:42:26 +01:00
Add tabattachto and tabdetachfrom
tabattach and tabdetach were already taken.
Line 249: For some reason tabs.match() doesn't return a generator in the
script as it should while it works in the prompt.
So instead we have this.
This commit is contained in:
@@ -238,3 +238,32 @@ create_command_and_mapping(
|
||||
},
|
||||
""
|
||||
)
|
||||
|
||||
create_command_and_mapping(
|
||||
"tabattachto",
|
||||
"Attach tab as child to another tab",
|
||||
function (args) {
|
||||
if (args[0]) {
|
||||
let tab = gBrowser.tabContainer.selectedItem;
|
||||
|
||||
let parenttab = tabs.getTab(parseInt(args[0], 10) - 1);
|
||||
|
||||
gBrowser.treeStyleTab.attachTabTo(tab, parenttab);
|
||||
}
|
||||
},
|
||||
"",
|
||||
{
|
||||
completer: function (context) {
|
||||
completion.buffer(context, false);
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
create_command_and_mapping(
|
||||
"tabdetachfrom",
|
||||
"Detach tab from parent",
|
||||
function () {
|
||||
gBrowser.treeStyleTab.detachTab(gBrowser.tabContainer.selectedItem);
|
||||
},
|
||||
""
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user