1
0
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:
Doug Kearns
2015-05-25 23:59:30 +10:00
parent 5ab1befbf7
commit c0b7c4c35d
31 changed files with 292 additions and 162 deletions

View File

@@ -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);