1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 04:27:59 +01:00

Add :list* commands, linkify help tags in certain output, and augment :yank to accept JavaScript directly.

This commit is contained in:
Kris Maglione
2010-12-18 11:54:31 -05:00
parent 3f343d0d98
commit f1e4ef93df
11 changed files with 197 additions and 37 deletions

View File

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