1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-31 03:45:47 +01:00

Backed out changeset ccb7eca3e069

This commit is contained in:
Kris Maglione
2011-08-23 23:17:52 -04:00
parent 435f30f7eb
commit e70cd8934d
7 changed files with 188 additions and 279 deletions

View File

@@ -97,15 +97,13 @@ var Contexts = Module("contexts", {
this.builtin.modifiable = false;
this.GroupFlag = Class("GroupFlag", CommandOption, {
init: function (name, defaultValue) {
init: function (name) {
this.name = name;
this.type = ArgType("group", function (group) {
return isString(group) ? contexts.getGroup(group, name)
: group[name];
});
this.defaultValue = defaultValue;
},
get toStringParams() [this.name],
@@ -114,9 +112,7 @@ var Contexts = Module("contexts", {
description: "Group to which to add",
get default() let (group = contexts.context && contexts.context.group)
!group && this.defaultValue !== undefined ? this.defaultValue
: (group || contexts.user)[this.name],
get default() (contexts.context && contexts.context.group || contexts.user)[this.name],
completer: function (context) modules.completion.group(context)
});