mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-22 18:15:50 +01:00
Replace expression closures (function declarations).
Expression closures are to be axed. See https://bugzil.la/1083458.
This commit is contained in:
@@ -174,10 +174,12 @@ var ConfigBase = Class("ConfigBase", {
|
||||
|
||||
let hl = highlight.set("Find", "");
|
||||
hl.onChange = function () {
|
||||
function hex(val) ("#" + util.regexp.iterate(/\d+/g, val)
|
||||
.map(num => ("0" + Number(num).toString(16)).slice(-2))
|
||||
.join("")
|
||||
).slice(0, 7);
|
||||
function hex(val) {
|
||||
return ("#" + util.regexp.iterate(/\d+/g, val)
|
||||
.map(num => ("0" + Number(num).toString(16)).slice(-2))
|
||||
.join("")
|
||||
).slice(0, 7);
|
||||
}
|
||||
|
||||
let elem = services.appShell.hiddenDOMWindow.document.createElement("div");
|
||||
elem.style.cssText = this.cssText;
|
||||
@@ -216,7 +218,9 @@ var ConfigBase = Class("ConfigBase", {
|
||||
*/
|
||||
locales: Class.Memoize(function () {
|
||||
// TODO: Merge with completion.file code.
|
||||
function getDir(str) str.match(/^(?:.*[\/\\])?/)[0];
|
||||
function getDir(str) {
|
||||
return str.match(/^(?:.*[\/\\])?/)[0];
|
||||
}
|
||||
|
||||
let uri = "resource://dactyl-locale/";
|
||||
let jar = io.isJarURL(uri);
|
||||
|
||||
Reference in New Issue
Block a user