From f1e4ef93dfefe9c06e011c8c53f6d09aa1cec5a5 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 18 Dec 2010 11:54:31 -0500 Subject: Add :list* commands, linkify help tags in certain output, and augment :yank to accept JavaScript directly. --- common/content/commandline.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'common/content/commandline.js') diff --git a/common/content/commandline.js b/common/content/commandline.js index b9e2147d..cd7f8c22 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -940,14 +940,18 @@ const CommandLine = Module("commandline", { dactyl.open(event.target.href, where); } + let command = event.originalTarget.getAttributeNS(NS.uri, "command"); + if (command && dactyl.commands[command]) { + return dactyl.withSavedValues(["forceNewTab"], function () { + dactyl.forceNewTab = event.ctrlKey || event.shiftKey || event.button == 1; + dactyl.commands[command](event); + }); + } + switch (key) { case "": event.preventDefault(); - let command = event.originalTarget.getAttributeNS(NS.uri, "command"); - if (command && dactyl.commands[command]) - return dactyl.commands[command](event); - else - openLink(dactyl.CURRENT_TAB); + openLink(dactyl.CURRENT_TAB); return false; case "": case "": @@ -1708,7 +1712,7 @@ const CommandLine = Module("commandline", { { validator: function (value) value >= 1 }); options.add(["messages", "msgs"], - "Number of messages to store in the :message history", + "Number of messages to store in the :messages history", "number", 100, { validator: function (value) value >= 0 }); -- cgit v1.2.3