Index: lib/filterStorage.js |
=================================================================== |
--- a/lib/filterStorage.js |
+++ b/lib/filterStorage.js |
@@ -112,17 +112,17 @@ let FilterStorage = exports.FilterStorag |
/** |
* Finds the filter group that a filter should be added to by default. Will |
* return null if this group doesn't exist yet. |
*/ |
getGroupForFilter: function(/**Filter*/ filter) /**SpecialSubscription*/ |
{ |
let generalSubscription = null; |
- for each (let subscription in FilterStorage.subscriptions) |
+ for (let subscription of FilterStorage.subscriptions) |
{ |
if (subscription instanceof SpecialSubscription && !subscription.disabled) |
{ |
// Always prefer specialized subscriptions |
if (subscription.isDefaultFor(filter)) |
return subscription; |
// If this is a general subscription - store it as fallback |
@@ -342,17 +342,17 @@ let FilterStorage = exports.FilterStorag |
resetHitCounts: function(filters) |
{ |
if (!filters) |
{ |
filters = []; |
for (let text in Filter.knownFilters) |
filters.push(Filter.knownFilters[text]); |
} |
- for each (let filter in filters) |
+ for (let filter of filters) |
{ |
filter.hitCount = 0; |
filter.lastHit = 0; |
} |
}, |
_loading: false, |
@@ -690,30 +690,30 @@ let FilterStorage = exports.FilterStorag |
* Joins subscription's filters to the subscription without any notifications. |
* @param {Subscription} subscription filter subscription that should be connected to its filters |
*/ |
function addSubscriptionFilters(subscription) |
{ |
if (!(subscription.url in FilterStorage.knownSubscriptions)) |
return; |
- for each (let filter in subscription.filters) |
+ for (let filter of subscription.filters) |
filter.subscriptions.push(subscription); |
} |
/** |
* Removes subscription's filters from the subscription without any notifications. |
* @param {Subscription} subscription filter subscription to be removed |
*/ |
function removeSubscriptionFilters(subscription) |
{ |
if (!(subscription.url in FilterStorage.knownSubscriptions)) |
return; |
- for each (let filter in subscription.filters) |
+ for (let filter of subscription.filters) |
{ |
let i = filter.subscriptions.indexOf(subscription); |
if (i >= 0) |
filter.subscriptions.splice(i, 1); |
} |
} |
/** |
@@ -834,17 +834,17 @@ INIParser.prototype = |
if (subscription) |
this.subscriptions.push(subscription); |
break; |
case "subscription filters": |
case "subscription patterns": |
if (this.subscriptions.length) |
{ |
let subscription = this.subscriptions[this.subscriptions.length - 1]; |
- for each (let text in this.curObj) |
+ for (let text of this.curObj) |
{ |
let filter = Filter.fromText(text); |
subscription.filters.push(filter); |
filter.subscriptions.push(subscription); |
} |
} |
break; |
case "user patterns": |