1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 15:52:29 +01:00

Fix 'for each' loops.

This commit is contained in:
Kris Maglione
2008-09-14 16:47:24 +00:00
parent f36d0848e1
commit 0a9b61dc73
3 changed files with 5 additions and 3 deletions

View File

@@ -320,6 +320,8 @@ liberator.Bookmarks = function () //{{{
// takes about 1 sec
get: function (filter, tags, bypassCache)
{
if(bypassCache) // Is this really necessary anymore?
cache.load();
return liberator.completion.filterURLArray(cache.bookmarks, filter, tags);
},

View File

@@ -911,7 +911,7 @@ liberator.Buffer = function () //{{{
elem.focus();
var evt = doc.createEvent("MouseEvents");
for each (event in ["mousedown", "mouseup", "click"])
for ([,event] in Iterator(["mousedown", "mouseup", "click"]))
{
evt.initMouseEvent(event, true, true, view, 1, offsetX, offsetY, 0, 0,
ctrlKey, /*altKey*/0, shiftKey, /*metaKey*/ ctrlKey, 0, null);
@@ -1493,7 +1493,7 @@ liberator.Marks = function () //{{{
// local marks
for (let [mark, value] in Iterator(localMarks))
{
for each (val in value.filter(function (val) val.location == location))
for (let [,val] in Iterator(value.filter(function (val) val.location == location)))
lmarks.push([mark, val]);
}
lmarks.sort();

View File

@@ -535,7 +535,7 @@ liberator.Completion = function () //{{{
// Longest Common Subsequence
// This shouldn't use buildLongestCommonSubstring for performance
// reasons, so as not to cycle through the urls twice
for each (elem in urls)
for (let [,elem] in Iterator(urls))
{
var url = elem[0] || "";
var title = elem[1] || "";