LEFT | RIGHT |
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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 __proto__: Filter.prototype, | 232 __proto__: Filter.prototype, |
233 | 233 |
234 _disabled: false, | 234 _disabled: false, |
235 _hitCount: 0, | 235 _hitCount: 0, |
236 _lastHit: 0, | 236 _lastHit: 0, |
237 | 237 |
238 /** | 238 /** |
239 * Defines whether the filter is disabled | 239 * Defines whether the filter is disabled |
240 * @type Boolean | 240 * @type Boolean |
241 */ | 241 */ |
242 get disabled() { | 242 get disabled() |
| 243 { |
243 return this._disabled; | 244 return this._disabled; |
244 }, | 245 }, |
245 set disabled(value) | 246 set disabled(value) |
246 { | 247 { |
247 if (value != this._disabled) | 248 if (value != this._disabled) |
248 { | 249 { |
249 let oldValue = this._disabled; | 250 let oldValue = this._disabled; |
250 this._disabled = value; | 251 this._disabled = value; |
251 FilterNotifier.triggerListeners("filter.disabled", this, value, oldValue); | 252 FilterNotifier.triggerListeners("filter.disabled", this, value, oldValue); |
252 } | 253 } |
253 return this._disabled; | 254 return this._disabled; |
254 }, | 255 }, |
255 | 256 |
256 /** | 257 /** |
257 * Number of hits on the filter since the last reset | 258 * Number of hits on the filter since the last reset |
258 * @type Number | 259 * @type Number |
259 */ | 260 */ |
260 get hitCount() { | 261 get hitCount() |
| 262 { |
261 return this._hitCount; | 263 return this._hitCount; |
262 }, | 264 }, |
263 set hitCount(value) | 265 set hitCount(value) |
264 { | 266 { |
265 if (value != this._hitCount) | 267 if (value != this._hitCount) |
266 { | 268 { |
267 let oldValue = this._hitCount; | 269 let oldValue = this._hitCount; |
268 this._hitCount = value; | 270 this._hitCount = value; |
269 FilterNotifier.triggerListeners("filter.hitCount", this, value, oldValue); | 271 FilterNotifier.triggerListeners("filter.hitCount", this, value, oldValue); |
270 } | 272 } |
271 return this._hitCount; | 273 return this._hitCount; |
272 }, | 274 }, |
273 | 275 |
274 /** | 276 /** |
275 * Last time the filter had a hit (in milliseconds since the beginning of the
epoch) | 277 * Last time the filter had a hit (in milliseconds since the beginning of the
epoch) |
276 * @type Number | 278 * @type Number |
277 */ | 279 */ |
278 get lastHit() { | 280 get lastHit() |
| 281 { |
279 return this._lastHit; | 282 return this._lastHit; |
280 }, | 283 }, |
281 set lastHit(value) | 284 set lastHit(value) |
282 { | 285 { |
283 if (value != this._lastHit) | 286 if (value != this._lastHit) |
284 { | 287 { |
285 let oldValue = this._lastHit; | 288 let oldValue = this._lastHit; |
286 this._lastHit = value; | 289 this._lastHit = value; |
287 FilterNotifier.triggerListeners("filter.lastHit", this, value, oldValue); | 290 FilterNotifier.triggerListeners("filter.lastHit", this, value, oldValue); |
288 } | 291 } |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 function ElemHideException(text, domains, selector) | 891 function ElemHideException(text, domains, selector) |
889 { | 892 { |
890 ElemHideBase.call(this, text, domains, selector); | 893 ElemHideBase.call(this, text, domains, selector); |
891 } | 894 } |
892 exports.ElemHideException = ElemHideException; | 895 exports.ElemHideException = ElemHideException; |
893 | 896 |
894 ElemHideException.prototype = | 897 ElemHideException.prototype = |
895 { | 898 { |
896 __proto__: ElemHideBase.prototype | 899 __proto__: ElemHideBase.prototype |
897 }; | 900 }; |
LEFT | RIGHT |