X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=common%2Fmodules%2Fcontexts.jsm;h=ffada2b7635446021f543c06cdc5c2a6e8165f7b;hb=3d837eb266a3a01d424192aa4ec1a167366178c5;hp=c34d2dded318ad56c02ee56b595b86b86768366c;hpb=8b6fcae7eaa413bc62d645d2d0c99835c47265e6;p=dactyl.git diff --git a/common/modules/contexts.jsm b/common/modules/contexts.jsm index c34d2dd..ffada2b 100644 --- a/common/modules/contexts.jsm +++ b/common/modules/contexts.jsm @@ -19,8 +19,6 @@ var Const = function Const(val) Class.Property({ enumerable: true, value: val }) var Group = Class("Group", { init: function init(name, description, filter, persist) { - const self = this; - this.name = name; this.description = description; this.filter = filter || this.constructor.defaultFilter; @@ -67,7 +65,7 @@ var Group = Class("Group", { get builtin() this.modules.contexts.builtinGroups.indexOf(this) >= 0, }, { - compileFilter: function (patterns, default_) { + compileFilter: function (patterns, default_ = false) { if (arguments.length < 2) default_ = false; @@ -171,13 +169,12 @@ var Contexts = Module("contexts", { Hives: Class("Hives", Class.Property, { init: function init(name, constructor) { const { contexts } = modules; - const self = this; if (this.Hive) return { enumerable: true, - get: function () array(contexts.groups[self.name]) + get: () => array(contexts.groups[this.name]) }; this.Hive = constructor; @@ -546,7 +543,7 @@ var Contexts = Module("contexts", { if (callable(params)) action = dactyl.userEval("(function action() { with (action.makeParams(this, arguments)) {" + args.literalArg + "} })"); else - action = dactyl.userFunc.apply(dactyl, params.concat(args.literalArg).array); + action = dactyl.userFunc.apply(dactyl, params.concat(args.literalArg)); process = function (param) isObject(param) && param.valueOf ? param.valueOf() : param; action.params = params; action.makeParams = makeParams; @@ -819,4 +816,4 @@ endModule(); // catch(e){ if (!e.stack) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: