diff --git a/common/content/dactyl.js b/common/content/dactyl.js index f98c9692..ab87a01c 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -723,8 +723,8 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { function add(ary) { description.push( ["dl", {}, template.map(ary, - function ([a, b]) [["dt", {}, a], " ", - ["dd", {}, b]])]); + ([a, b]) => [["dt", {}, a], " ", + ["dd", {}, b]])]); } if (obj.completer && false) @@ -1270,7 +1270,8 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { cache.register("help/index.xml", function () { return '\n' + DOM.toXML(["overlay", { xmlns: "dactyl" }, - template.map(dactyl.indices, ([name, iter]) => + template.map(iter(dactyl.indices), + ([name, iter]) => ["dl", { insertafter: name + "-index" }, template.map(iter(), util.identity)], "\n\n")]); @@ -1280,7 +1281,8 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { return '\n' + DOM.toXML(["overlay", { xmlns: "dactyl" }, ["dl", { insertafter: "dialog-list" }, - template.map(config.dialogs, ([name, val]) => + template.map(iter(config.dialogs), + ([name, val]) => (!val[2] || val[2]()) ? [["dt", {}, name], ["dd", {}, val[0]]] @@ -1293,8 +1295,8 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { DOM.toXML(["overlay", { xmlns: "dactyl" }, ["dl", { insertafter: "sanitize-items" }, template.map(options.get("sanitizeitems").values - .sort((a, b) => String.localeCompare(a.name, - b.name)), + .sort((a, b) => String.localeCompare(a.name, + b.name)), ({ name, description }) => [["dt", {}, name], ["dd", {}, template.linkifyHelp(description, true)]], diff --git a/common/modules/dom.jsm b/common/modules/dom.jsm index c531e6b8..c240376c 100644 --- a/common/modules/dom.jsm +++ b/common/modules/dom.jsm @@ -598,7 +598,7 @@ var DOM = Class("DOM", { res.push(["span", { highlight: "HelpXML" }, ["span", { highlight: "HelpXMLTagStart" }, "<", namespaced(elem), " ", - template.map(array.iterValues(elem.attributes), + template.map(elem.attributes, attr => [ ["span", { highlight: "HelpXMLAttribute" }, namespaced(attr)], ["span", { highlight: "HelpXMLString" }, attr.value] diff --git a/common/modules/javascript.jsm b/common/modules/javascript.jsm index 7ba40fe4..9fa80710 100644 --- a/common/modules/javascript.jsm +++ b/common/modules/javascript.jsm @@ -490,7 +490,7 @@ var JavaScript = Module("javascript", { if (callable(func)) { let [, prefix, args] = /^(function .*?)\((.*?)\)/.exec(Function.prototype.toString.call(func)); let n = this._get(i).comma.length; - args = template.map(Iterator(args.split(", ")), + args = template.map(args.split(", ").entries(), ([i, arg]) => ["span", { highlight: i == n ? "Filter" : "" }, arg], ",\u00a0"); this.context.message = ["", prefix + "(", args, ")"]; diff --git a/common/modules/sanitizer.jsm b/common/modules/sanitizer.jsm index 053ffbc6..4fec76c9 100644 --- a/common/modules/sanitizer.jsm +++ b/common/modules/sanitizer.jsm @@ -201,9 +201,11 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef ["column", { flex: "1" }], ["column", { flex: "1" }]], ["rows", {}, - template.map(util.range(0, Math.ceil(items.length / 2)), i => + template.map(util.range(0, Math.ceil(items.length / 2)), + i => ["row", {}, - template.map(items.slice(i * 2, i * 2 + 2), item => + template.map(items.slice(i * 2, i * 2 + 2), + item => ["checkbox", { xmlns: XUL, label: item.description, preference: branch + item.name }])])]]] } }); diff --git a/pentadactyl/install.rdf b/pentadactyl/install.rdf index d55b72ea..ed7cf477 100644 --- a/pentadactyl/install.rdf +++ b/pentadactyl/install.rdf @@ -31,7 +31,7 @@