1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-22 08:25:45 +01:00

Get rid of most remaining comprehensions.

This commit is contained in:
Kris Maglione
2015-12-20 15:53:43 -08:00
parent 0aba8fb619
commit 916ea412a5
34 changed files with 372 additions and 256 deletions

View File

@@ -296,10 +296,8 @@ var Overlay = Module("Overlay", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReferen
function insert(key, fn) {
if (obj[key]) {
let iterator = iter(obj[key]);
if (isArray(obj[key])) {
iterator = ([elem[1].id, elem.slice(2), elem[1]]
for (elem of obj[key]));
}
if (isArray(obj[key]))
iterator = obj[key].map(elem => [elem[1].id, elem.slice(2), elem[1]]);
for (let [elem, xml, attrs] of iterator) {
if (elem = doc.getElementById(String(elem))) {
@@ -479,7 +477,7 @@ var Overlay = Module("Overlay", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReferen
return this.activeWindow && this.activeWindow.dactyl.modules;
},
get modules() { return [w.dactyl.modules for (w of this.windows)]; },
get modules() { return Array.from(this.windows, win => win.dactyl.modules) },
/**
* The most recently active dactyl window.