1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 20:42:27 +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:
Nelo Wallus
2016-01-15 14:25:58 +01:00
parent 2a5f1fe30e
commit 4f3a3bd135

View File

@@ -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);
},
""
)