Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/Public.jsm

Issue 6341149593698304: Issue 301 - Change for each to for .. of .. in lib/ (Closed)
Patch Set: Created April 10, 2014, 5:02 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/antiadblockInit.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Public.jsm
===================================================================
--- a/lib/Public.jsm
+++ b/lib/Public.jsm
@@ -88,17 +88,17 @@ var AdblockPlus =
id = externalPrefix + id;
let subscription = Subscription.knownSubscriptions[id];
if (typeof subscription == "undefined")
subscription = new ExternalSubscription(id, title);
subscription.lastDownload = parseInt(new Date().getTime() / 1000);
let newFilters = [];
- for each (let filter in filters)
+ for (let filter of filters)
{
filter = Filter.fromText(Filter.normalize(filter));
if (filter)
newFilters.push(filter);
}
if (id in FilterStorage.knownSubscriptions)
FilterStorage.updateSubscriptionFilters(subscription, newFilters);
@@ -125,33 +125,33 @@ var AdblockPlus =
return true;
},
/**
* Adds user-defined filters to the list
*/
addPatterns: function(/**Array of String*/ filters)
{
- for each (let filter in filters)
+ for (let filter of filters)
{
filter = Filter.fromText(Filter.normalize(filter));
if (filter)
{
filter.disabled = false;
FilterStorage.addFilter(filter);
}
}
},
/**
* Removes user-defined filters from the list
*/
removePatterns: function(/**Array of String*/ filters)
{
- for each (let filter in filters)
+ for (let filter of filters)
{
filter = Filter.fromText(Filter.normalize(filter));
if (filter)
FilterStorage.removeFilter(filter);
}
},
/**
« no previous file with comments | « no previous file | lib/antiadblockInit.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld