OLD | NEW |
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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 get disabled() | 326 get disabled() |
327 { | 327 { |
328 return this._disabled; | 328 return this._disabled; |
329 }, | 329 }, |
330 set disabled(value) | 330 set disabled(value) |
331 { | 331 { |
332 if (value != this._disabled) | 332 if (value != this._disabled) |
333 { | 333 { |
334 let oldValue = this._disabled; | 334 let oldValue = this._disabled; |
335 this._disabled = value; | 335 this._disabled = value; |
336 FilterNotifier.triggerListeners("filter.disabled", this, value, oldValue); | 336 FilterNotifier.emit("filter.disabled", this, value, oldValue); |
337 } | 337 } |
338 return this._disabled; | 338 return this._disabled; |
339 }, | 339 }, |
340 | 340 |
341 /** | 341 /** |
342 * Number of hits on the filter since the last reset | 342 * Number of hits on the filter since the last reset |
343 * @type {number} | 343 * @type {number} |
344 */ | 344 */ |
345 get hitCount() | 345 get hitCount() |
346 { | 346 { |
347 return this._hitCount; | 347 return this._hitCount; |
348 }, | 348 }, |
349 set hitCount(value) | 349 set hitCount(value) |
350 { | 350 { |
351 if (value != this._hitCount) | 351 if (value != this._hitCount) |
352 { | 352 { |
353 let oldValue = this._hitCount; | 353 let oldValue = this._hitCount; |
354 this._hitCount = value; | 354 this._hitCount = value; |
355 FilterNotifier.triggerListeners("filter.hitCount", this, value, oldValue); | 355 FilterNotifier.emit("filter.hitCount", this, value, oldValue); |
356 } | 356 } |
357 return this._hitCount; | 357 return this._hitCount; |
358 }, | 358 }, |
359 | 359 |
360 /** | 360 /** |
361 * Last time the filter had a hit (in milliseconds since the beginning of the | 361 * Last time the filter had a hit (in milliseconds since the beginning of the |
362 * epoch) | 362 * epoch) |
363 * @type {number} | 363 * @type {number} |
364 */ | 364 */ |
365 get lastHit() | 365 get lastHit() |
366 { | 366 { |
367 return this._lastHit; | 367 return this._lastHit; |
368 }, | 368 }, |
369 set lastHit(value) | 369 set lastHit(value) |
370 { | 370 { |
371 if (value != this._lastHit) | 371 if (value != this._lastHit) |
372 { | 372 { |
373 let oldValue = this._lastHit; | 373 let oldValue = this._lastHit; |
374 this._lastHit = value; | 374 this._lastHit = value; |
375 FilterNotifier.triggerListeners("filter.lastHit", this, value, oldValue); | 375 FilterNotifier.emit("filter.lastHit", this, value, oldValue); |
376 } | 376 } |
377 return this._lastHit; | 377 return this._lastHit; |
378 }, | 378 }, |
379 | 379 |
380 /** | 380 /** |
381 * String that the domains property should be generated from | 381 * String that the domains property should be generated from |
382 * @type {?string} | 382 * @type {?string} |
383 */ | 383 */ |
384 domainSource: null, | 384 domainSource: null, |
385 | 385 |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1187 | 1187 |
1188 /** | 1188 /** |
1189 * Script that should be executed | 1189 * Script that should be executed |
1190 * @type {string} | 1190 * @type {string} |
1191 */ | 1191 */ |
1192 get script() | 1192 get script() |
1193 { | 1193 { |
1194 return this.body; | 1194 return this.body; |
1195 } | 1195 } |
1196 }); | 1196 }); |
OLD | NEW |