mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 02:17:59 +01:00
Remove 'for each' usage in shared globals.
This commit is contained in:
@@ -2012,7 +2012,7 @@ var ItemList = Class("ItemList", {
|
|||||||
updateOffsets: function updateOffsets() {
|
updateOffsets: function updateOffsets() {
|
||||||
let total = this.itemCount;
|
let total = this.itemCount;
|
||||||
let count = 0;
|
let count = 0;
|
||||||
for each (let group in this.activeGroups) {
|
for (let group in values(this.activeGroups)) {
|
||||||
group.offsets = { start: count, end: total - count - group.itemCount };
|
group.offsets = { start: count, end: total - count - group.itemCount };
|
||||||
count += group.itemCount;
|
count += group.itemCount;
|
||||||
}
|
}
|
||||||
@@ -2027,7 +2027,7 @@ var ItemList = Class("ItemList", {
|
|||||||
|
|
||||||
let container = DOM(this.nodes.completions);
|
let container = DOM(this.nodes.completions);
|
||||||
let groups = this.activeGroups;
|
let groups = this.activeGroups;
|
||||||
for each (let group in groups) {
|
for (let group in values(groups)) {
|
||||||
group.reset();
|
group.reset();
|
||||||
container.append(group.nodes.root);
|
container.append(group.nodes.root);
|
||||||
}
|
}
|
||||||
@@ -2070,7 +2070,7 @@ var ItemList = Class("ItemList", {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
draw: function draw() {
|
draw: function draw() {
|
||||||
for each (let group in this.activeGroups)
|
for (let group in values(this.activeGroups))
|
||||||
group.draw();
|
group.draw();
|
||||||
|
|
||||||
// We need to collect all of the rescrolling functions in
|
// We need to collect all of the rescrolling functions in
|
||||||
@@ -2178,7 +2178,7 @@ var ItemList = Class("ItemList", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let count = this.maxItems;
|
let count = this.maxItems;
|
||||||
for each (let group in groups) {
|
for (let group in values(groups)) {
|
||||||
let off = Math.max(0, start - group.offsets.start);
|
let off = Math.max(0, start - group.offsets.start);
|
||||||
|
|
||||||
group.count = Math.constrain(group.itemCount - off, 0, count);
|
group.count = Math.constrain(group.itemCount - off, 0, count);
|
||||||
|
|||||||
@@ -1234,7 +1234,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
info.* = info.*.(function::attribute("lang").length() == 0 || @lang == lang);
|
info.* = info.*.(function::attribute("lang").length() == 0 || @lang == lang);
|
||||||
|
|
||||||
for each (let elem in info.NS::info)
|
for each (let elem in info.NS::info)
|
||||||
for each (let attr in ["@name", "@summary", "@href"])
|
for (let attr in values(["@name", "@summary", "@href"]))
|
||||||
if (elem[attr].length())
|
if (elem[attr].length())
|
||||||
info[attr] = elem[attr];
|
info[attr] = elem[attr];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user