summaryrefslogtreecommitdiff
path: root/common/content/commandline.js
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2010-12-18 11:54:31 -0500
committerKris Maglione <maglione.k@gmail.com>2010-12-18 11:54:31 -0500
commitf1e4ef93dfefe9c06e011c8c53f6d09aa1cec5a5 (patch)
tree0eda4a26ee5494ee84460a6ac3ca4225493e26cf /common/content/commandline.js
parent3f343d0d983f0e6c67a8515a4dcc6622531a7ae5 (diff)
downloadpentadactyl-f1e4ef93dfefe9c06e011c8c53f6d09aa1cec5a5.tar.gz
Add :list* commands, linkify help tags in certain output, and augment :yank to accept JavaScript directly.
Diffstat (limited to 'common/content/commandline.js')
-rw-r--r--common/content/commandline.js16
1 files changed, 10 insertions, 6 deletions
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 "<LeftMouse>":
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 "<MiddleMouse>":
case "<C-LeftMouse>":
@@ -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 });