| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 330 }, | 330 }, |
| 331 | 331 |
| 332 /** | 332 /** |
| 333 * Resets hit count for some filters | 333 * Resets hit count for some filters |
| 334 * @param {Filter[]} filters filters to be reset, if null all filters will | 334 * @param {Filter[]} filters filters to be reset, if null all filters will |
| 335 * be reset | 335 * be reset |
| 336 */ | 336 */ |
| 337 resetHitCounts(filters) | 337 resetHitCounts(filters) |
| 338 { | 338 { |
| 339 if (!filters) | 339 if (!filters) |
| 340 { | |
|
Wladimir Palant
2017/09/20 08:59:10
Nit: You can remove the brackets around this block
sergei
2017/09/20 09:22:40
Done.
| |
| 341 filters = Filter.knownFilters.values(); | 340 filters = Filter.knownFilters.values(); |
| 342 } | |
| 343 for (let filter of filters) | 341 for (let filter of filters) |
| 344 { | 342 { |
| 345 filter.hitCount = 0; | 343 filter.hitCount = 0; |
| 346 filter.lastHit = 0; | 344 filter.lastHit = 0; |
| 347 } | 345 } |
| 348 }, | 346 }, |
| 349 | 347 |
| 350 /** | 348 /** |
| 351 * @callback TextSink | 349 * @callback TextSink |
| 352 * @param {string?} line | 350 * @param {string?} line |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 775 else if (this.wantObj === false && val) | 773 else if (this.wantObj === false && val) |
| 776 this.curObj.push(val.replace(/\\\[/g, "[")); | 774 this.curObj.push(val.replace(/\\\[/g, "[")); |
| 777 } | 775 } |
| 778 finally | 776 finally |
| 779 { | 777 { |
| 780 Filter.knownFilters = origKnownFilters; | 778 Filter.knownFilters = origKnownFilters; |
| 781 Subscription.knownSubscriptions = origKnownSubscriptions; | 779 Subscription.knownSubscriptions = origKnownSubscriptions; |
| 782 } | 780 } |
| 783 } | 781 } |
| 784 }; | 782 }; |
| LEFT | RIGHT |