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

Side by Side Diff: chrome/content/ui/filters-subscriptionview.js

Issue 6519778499887104: Issue 2010 - Remove some uses of "for each" with "for of" (Closed)
Patch Set: Created Feb. 26, 2015, 11:50 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/content/ui/filters-filterview.js ('k') | chrome/content/ui/sendReport.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 reload: function() 80 reload: function()
81 { 81 {
82 // Remove existing entries if any 82 // Remove existing entries if any
83 while (this._list.firstChild) 83 while (this._list.firstChild)
84 this._list.removeChild(this._list.firstChild); 84 this._list.removeChild(this._list.firstChild);
85 85
86 // Now add all subscriptions 86 // Now add all subscriptions
87 let subscriptions = FilterStorage.subscriptions.filter(this._filter, this); 87 let subscriptions = FilterStorage.subscriptions.filter(this._filter, this);
88 if (subscriptions.length) 88 if (subscriptions.length)
89 { 89 {
90 for each (let subscription in subscriptions) 90 for (let subscription of subscriptions)
91 this.addSubscription(subscription, null); 91 this.addSubscription(subscription, null);
92 92
93 // Make sure first list item is selected after list initialization 93 // Make sure first list item is selected after list initialization
94 Utils.runAsync(function() 94 Utils.runAsync(function()
95 { 95 {
96 this._list.selectItem(this._list.getItemAtIndex(this._list.getIndexOfFir stVisibleRow())); 96 this._list.selectItem(this._list.getItemAtIndex(this._list.getIndexOfFir stVisibleRow()));
97 }, this); 97 }, this);
98 } 98 }
99 99
100 this._deck.selectedIndex = (subscriptions.length ? 1 : 0); 100 this._deck.selectedIndex = (subscriptions.length ? 1 : 0);
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 { 321 {
322 FilterStorage.addSubscription(subscription); 322 FilterStorage.addSubscription(subscription);
323 if (subscription instanceof DownloadableSubscription && !subscription.lastDo wnload) 323 if (subscription instanceof DownloadableSubscription && !subscription.lastDo wnload)
324 Synchronizer.execute(subscription); 324 Synchronizer.execute(subscription);
325 } 325 }
326 else 326 else
327 FilterStorage.removeSubscription(subscription); 327 FilterStorage.removeSubscription(subscription);
328 }; 328 };
329 329
330 window.addEventListener("load", ListManager.init, false); 330 window.addEventListener("load", ListManager.init, false);
OLDNEW
« no previous file with comments | « chrome/content/ui/filters-filterview.js ('k') | chrome/content/ui/sendReport.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld