mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 23:58:00 +01:00
Replace expression closures (function declarations).
Expression closures are to be axed. See https://bugzil.la/1083458.
This commit is contained in:
@@ -382,7 +382,10 @@ var JavaScript = Module("javascript", {
|
||||
}
|
||||
|
||||
// We've already listed anchored matches, so don't list them again here.
|
||||
function unanchored(item) util.compareIgnoreCase(item.text.substr(0, this.filter.length), this.filter);
|
||||
function unanchored(item) {
|
||||
return util.compareIgnoreCase(item.text.substr(0, this.filter.length),
|
||||
this.filter);
|
||||
}
|
||||
|
||||
objects.forEach(function (obj) {
|
||||
let context = base.fork(obj[1]);
|
||||
@@ -856,7 +859,9 @@ var JavaScript = Module("javascript", {
|
||||
mappings: function initMappings(dactyl, modules, window) {
|
||||
const { mappings, modes } = modules;
|
||||
|
||||
function bind(...args) apply(mappings, "add", [[modes.REPL]].concat(args))
|
||||
function bind(...args) {
|
||||
return apply(mappings, "add", [[modes.REPL]].concat(args));
|
||||
}
|
||||
|
||||
bind(["<Return>"], "Accept the current input",
|
||||
function ({ self }) { self.accept(); });
|
||||
|
||||
Reference in New Issue
Block a user