From d8e002fb4369c26a117b5e68ae3c6bc5c433b54f Mon Sep 17 00:00:00 2001 From: Nelo Wallus Date: Fri, 8 Jan 2016 19:53:06 +0100 Subject: [PATCH] Fix to handle multiple arguments and allow completion --- plugins/contrib/treestyletabs.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/plugins/contrib/treestyletabs.js b/plugins/contrib/treestyletabs.js index 166a370b..9d3ef112 100644 --- a/plugins/contrib/treestyletabs.js +++ b/plugins/contrib/treestyletabs.js @@ -163,8 +163,23 @@ create_command_and_mapping( "tabchildopen", "Open one or more URLs in a new child tab", function (args) { - TreeStyleTabService.readyToOpenChildTab(); - dactyl.open(args, { where: dactyl.NEW_TAB }); + let tab = gBrowser.tabContainer.selectedItem; + TreeStyleTabService.readyToOpenChildTab(tab, true); + dactyl.open(args[0] || "about:blank", + { from: "tabopen", where: dactyl.NEW_TAB, background: args.bang }); + TreeStyleTabService.stopToOpenChildTab(); + }, + "", + { + bang: true, + completer: function (context) { + completion.url(context); + }, + domains: function (args) { + return commands.get("open").domains(args); + }, + literal: 0, + privateData: true }, "" );