mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-24 15:23:31 +01:00
Move iteration utility functions to the iter namespace.
This commit is contained in:
@@ -36,14 +36,14 @@ var History = Module("history", {
|
||||
// execute the query
|
||||
let root = services.history.executeQuery(query, options).root;
|
||||
root.containerOpen = true;
|
||||
let items = util.map(util.range(0, root.childCount), function (i) {
|
||||
let items = iter(util.range(0, root.childCount)).map(function (i) {
|
||||
let node = root.getChild(i);
|
||||
return {
|
||||
url: node.uri,
|
||||
title: node.title,
|
||||
icon: node.icon ? node.icon.spec : DEFAULT_FAVICON
|
||||
};
|
||||
});
|
||||
}).toArray();
|
||||
root.containerOpen = false; // close a container after using it!
|
||||
|
||||
return items;
|
||||
|
||||
Reference in New Issue
Block a user