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

Side by Side Diff: lib/subscriptionClasses.js

Issue 6341149593698304: Issue 301 - Change for each to for .. of .. in lib/ (Closed)
Patch Set: Created April 10, 2014, 5:02 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 | « lib/requestNotifier.js ('k') | lib/sync.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 <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 buffer.push("url=" + this.url); 122 buffer.push("url=" + this.url);
123 buffer.push("title=" + this._title); 123 buffer.push("title=" + this._title);
124 if (this._fixedTitle) 124 if (this._fixedTitle)
125 buffer.push("fixedTitle=true"); 125 buffer.push("fixedTitle=true");
126 if (this._disabled) 126 if (this._disabled)
127 buffer.push("disabled=true"); 127 buffer.push("disabled=true");
128 }, 128 },
129 129
130 serializeFilters: function(buffer) 130 serializeFilters: function(buffer)
131 { 131 {
132 for each (let filter in this.filters) 132 for (let filter of this.filters)
133 buffer.push(filter.text.replace(/\[/g, "\\[")); 133 buffer.push(filter.text.replace(/\[/g, "\\["));
134 }, 134 },
135 135
136 toString: function() 136 toString: function()
137 { 137 {
138 let buffer = []; 138 let buffer = [];
139 this.serialize(buffer); 139 this.serialize(buffer);
140 return buffer.join("\n"); 140 return buffer.join("\n");
141 } 141 }
142 }; 142 };
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 267
268 /** 268 /**
269 * Tests whether a filter should be added to this group by default 269 * Tests whether a filter should be added to this group by default
270 * @param {Filter} filter filter to be tested 270 * @param {Filter} filter filter to be tested
271 * @return {Boolean} 271 * @return {Boolean}
272 */ 272 */
273 isDefaultFor: function(filter) 273 isDefaultFor: function(filter)
274 { 274 {
275 if (this.defaults && this.defaults.length) 275 if (this.defaults && this.defaults.length)
276 { 276 {
277 for each (let type in this.defaults) 277 for (let type of this.defaults)
278 { 278 {
279 if (filter instanceof SpecialSubscription.defaultsMap[type]) 279 if (filter instanceof SpecialSubscription.defaultsMap[type])
280 return true; 280 return true;
281 if (!(filter instanceof ActiveFilter) && type == "blacklist") 281 if (!(filter instanceof ActiveFilter) && type == "blacklist")
282 return true; 282 return true;
283 } 283 }
284 } 284 }
285 285
286 return false; 286 return false;
287 }, 287 },
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 if (this.softExpiration) 554 if (this.softExpiration)
555 buffer.push("softExpiration=" + this.softExpiration); 555 buffer.push("softExpiration=" + this.softExpiration);
556 if (this.errors) 556 if (this.errors)
557 buffer.push("errors=" + this.errors); 557 buffer.push("errors=" + this.errors);
558 if (this.version) 558 if (this.version)
559 buffer.push("version=" + this.version); 559 buffer.push("version=" + this.version);
560 if (this.requiredVersion) 560 if (this.requiredVersion)
561 buffer.push("requiredVersion=" + this.requiredVersion); 561 buffer.push("requiredVersion=" + this.requiredVersion);
562 } 562 }
563 }; 563 };
OLDNEW
« no previous file with comments | « lib/requestNotifier.js ('k') | lib/sync.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld