1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 22:42:26 +01:00

Allow to pass options for commands

This commit is contained in:
Nelo Wallus
2016-01-08 19:45:08 +01:00
parent 0897c7a804
commit dc136dc30b

View File

@@ -50,8 +50,8 @@ function fold_collapse_expand_toggle(children = false) {
); );
} }
function create_command_and_mapping(command, description, funcref, mapping) { function create_command_and_mapping(command, description, funcref, mapping, command_option = {}) {
group.commands.add([command], description, funcref, {}, true ); group.commands.add([command], description, funcref, command_option, true );
if (mapping != "") if (mapping != "")
group.mappings.add([modes.NORMAL], [mapping], description, funcref); group.mappings.add([modes.NORMAL], [mapping], description, funcref);
} }