1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-02 18:34:12 +01:00

Replace weird mystery meat args of mapping actions with a proper object.

This commit is contained in:
Kris Maglione
2010-12-29 22:21:00 -05:00
parent f67a50147e
commit cb97f1cd25
12 changed files with 87 additions and 98 deletions

View File

@@ -192,17 +192,17 @@ var QuickMarks = Module("quickmarks", {
mappings.add(myModes,
["go"], "Jump to a QuickMark",
function (arg) { quickmarks.jumpTo(arg, dactyl.CURRENT_TAB); },
function (args) { quickmarks.jumpTo(args.arg, dactyl.CURRENT_TAB); },
{ arg: true });
mappings.add(myModes,
["gn"], "Jump to a QuickMark in a new tab",
function (arg) { quickmarks.jumpTo(arg, { from: "quickmark", where: dactyl.NEW_TAB }); },
function (args) { quickmarks.jumpTo(args.arg, { from: "quickmark", where: dactyl.NEW_TAB }); },
{ arg: true });
mappings.add(myModes,
["M"], "Add new QuickMark for current URL",
function (arg) {
function ({ arg }) {
dactyl.assert(/^[a-zA-Z0-9]$/.test(arg));
quickmarks.add(arg, buffer.URL);
},