mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 08:07:59 +01:00
Fix some "for each" iteration of arrays.
This commit is contained in:
@@ -92,9 +92,9 @@ function Bookmarks() //{{{
|
|||||||
this.__defineGetter__("bookmarks", function () this.load());
|
this.__defineGetter__("bookmarks", function () this.load());
|
||||||
|
|
||||||
this.__defineGetter__("keywords",
|
this.__defineGetter__("keywords",
|
||||||
function () [new Keyword(k.keyword, k.title, k.icon, k.url) for each (k in self.bookmarks) if (k.keyword)]);
|
function () [new Keyword(k.keyword, k.title, k.icon, k.url) for ([,k] in Iterator(self.bookmarks)) if (k.keyword)]);
|
||||||
|
|
||||||
this.__iterator__ = function () (val for each (val in self.bookmarks));
|
this.__iterator__ = function () (val for ([,val] in Iterator(self.bookmarks)));
|
||||||
|
|
||||||
function loadBookmark(node)
|
function loadBookmark(node)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1945,7 +1945,7 @@ function Marks() //{{{
|
|||||||
Math.round(mark[1].position.x * 100) + "%",
|
Math.round(mark[1].position.x * 100) + "%",
|
||||||
Math.round(mark[1].position.y * 100) + "%",
|
Math.round(mark[1].position.y * 100) + "%",
|
||||||
mark[1].location]
|
mark[1].location]
|
||||||
for each (mark in marks)));
|
for ([,mark] in Iterator(marks))));
|
||||||
commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
|
commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1091,7 +1091,7 @@ function Commands() //{{{
|
|||||||
cmd.count ? "0c" : "",
|
cmd.count ? "0c" : "",
|
||||||
completerToString(cmd.completer),
|
completerToString(cmd.completer),
|
||||||
cmd.replacementText || "function () { ... }"]
|
cmd.replacementText || "function () { ... }"]
|
||||||
for each (cmd in cmds)));
|
for ([,cmd] in Iterator(cmds))));
|
||||||
|
|
||||||
commandline.echo(str, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
|
commandline.echo(str, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ function Hints() //{{{
|
|||||||
return [elem.value, false];
|
return [elem.value, false];
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for each (let option in options["hintinputs"].split(","))
|
for (let [,option] in Iterator(options["hintinputs"].split(",")))
|
||||||
{
|
{
|
||||||
if (option == "value")
|
if (option == "value")
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1050,7 +1050,7 @@ const liberator = (function () //{{{
|
|||||||
}
|
}
|
||||||
|
|
||||||
liberator.echomsg('Searching for "plugin/**/*.{js,vimp}" in "'
|
liberator.echomsg('Searching for "plugin/**/*.{js,vimp}" in "'
|
||||||
+ [dir.path.replace(/.plugin$/, "") for each (dir in dirs)].join(",") + '"', 2);
|
+ [dir.path.replace(/.plugin$/, "") for ([,dir] in Iterator(dirs))].join(",") + '"', 2);
|
||||||
|
|
||||||
dirs.forEach(function (dir) {
|
dirs.forEach(function (dir) {
|
||||||
liberator.echomsg("Searching for \"" + (dir.path + "/**/*.{js,vimp}") + "\"", 3);
|
liberator.echomsg("Searching for \"" + (dir.path + "/**/*.{js,vimp}") + "\"", 3);
|
||||||
|
|||||||
@@ -509,7 +509,7 @@ let (array = util.Array)
|
|||||||
catch (e) {}
|
catch (e) {}
|
||||||
context.fork("others", 0, this, function (context) {
|
context.fork("others", 0, this, function (context) {
|
||||||
context.title = ["Site"];
|
context.title = ["Site"];
|
||||||
context.completions = [[s, ""] for each (s in styles.sites)];
|
context.completions = [[s, ""] for ([,s] in Iterator(styles.sites))];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user