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

Side by Side Diff: lib/filterClasses.js

Issue 29934588: Issue 7094 - Encapsulate management of subscription filters (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Reworked Created Nov. 3, 2018, 2:20 a.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 | « no previous file | lib/filterListener.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-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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 /** 81 /**
82 * Filter type as a string, e.g. "blocking". 82 * Filter type as a string, e.g. "blocking".
83 * @type {string} 83 * @type {string}
84 */ 84 */
85 get type() 85 get type()
86 { 86 {
87 throw new Error("Please define filter type in the subclass"); 87 throw new Error("Please define filter type in the subclass");
88 }, 88 },
89 89
90 /** 90 /**
91 * Whether this filter is lightweight.
92 * @type {boolean}
93 */
94 lightweight: false,
95
96 /**
91 * Yields subscriptions to which the filter belongs. 97 * Yields subscriptions to which the filter belongs.
92 * @yields {Subscription} 98 * @yields {Subscription}
93 */ 99 */
94 *subscriptions() 100 *subscriptions()
95 { 101 {
96 if (this._subscriptions) 102 if (this._subscriptions)
97 { 103 {
98 if (this._subscriptions instanceof Set) 104 if (this._subscriptions instanceof Set)
99 yield* this._subscriptions; 105 yield* this._subscriptions;
100 else 106 else
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 1359
1354 /** 1360 /**
1355 * Script that should be executed 1361 * Script that should be executed
1356 * @type {string} 1362 * @type {string}
1357 */ 1363 */
1358 get script() 1364 get script()
1359 { 1365 {
1360 return this.body; 1366 return this.body;
1361 } 1367 }
1362 }); 1368 });
OLDNEW
« no previous file with comments | « no previous file | lib/filterListener.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld