diff options
author | Doug Kearns <dougkearns@gmail.com> | 2015-05-26 03:38:58 +1000 |
---|---|---|
committer | Doug Kearns <dougkearns@gmail.com> | 2015-05-26 03:38:58 +1000 |
commit | ce82387cdde9fc4791fb14d66288ed79ef4cd9af (patch) | |
tree | e80574cdb0a577821bceccf1fa33b0c95b14aea8 /common/modules/styles.jsm | |
parent | 34bfc2f50f8eec7e1aac8bbd3e55dbd7120253de (diff) | |
download | pentadactyl-ce82387cdde9fc4791fb14d66288ed79ef4cd9af.tar.gz |
Replace expression closures (function expressions).
Expression closures are to be axed. See https://bugzil.la/1083458.
Diffstat (limited to 'common/modules/styles.jsm')
-rw-r--r-- | common/modules/styles.jsm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/modules/styles.jsm b/common/modules/styles.jsm index 12193e59..360b295a 100644 --- a/common/modules/styles.jsm +++ b/common/modules/styles.jsm @@ -394,7 +394,7 @@ var Styles = Module("Styles", { completeSite: function (context, content, group=styles.user) { context.anchored = false; try { - context.fork("current", 0, this, function (context) { + context.fork("current", 0, this, context => { context.title = ["Current Site"]; context.completions = [ [content.location.host, /*L*/"Current Host"], @@ -456,7 +456,7 @@ var Styles = Module("Styles", { splitContext: function splitContext(context, title) { for (let item of iter({ Active: true, Inactive: false })) { let [name, active] = item; - context.split(name, null, function (context) { + context.split(name, null, context => { context.title[0] = /*L*/name + " " + (title || "Sheets"); context.filters.push(item => !!item.active == active); }); @@ -728,7 +728,7 @@ var Styles = Module("Styles", { }, completion: function initCompletion(dactyl, modules, window) { const names = Array.slice(DOM(["div"], window.document).style); - modules.completion.css = function (context) { + modules.completion.css = context => { context.title = ["CSS Property"]; context.keys = { text: function (p) p + ":", description: function () "" }; @@ -755,12 +755,12 @@ var Styles = Module("Styles", { let patterns = Styles.patterns; template.highlightCSS = function highlightCSS(css) { - return this.highlightRegexp(css, patterns.property, function (match) { + return this.highlightRegexp(css, patterns.property, match => { if (!match.length) return []; return ["", match.preSpace, template.filter(match.name), ": ", - template.highlightRegexp(match.value, patterns.token, function (match) { + template.highlightRegexp(match.value, patterns.token, match => { if (match.function) return ["", template.filter(match.word), template.highlightRegexp(match.function, patterns.string, |