| 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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 475 return false; | 475 return false; |
| 476 | 476 |
| 477 return true; | 477 return true; |
| 478 }, | 478 }, |
| 479 | 479 |
| 480 /** | 480 /** |
| 481 * Checks whether this filter is generic or specific | 481 * Checks whether this filter is generic or specific |
| 482 */ | 482 */ |
| 483 isGeneric: function() /**Boolean*/ | 483 isGeneric: function() /**Boolean*/ |
| 484 { | 484 { |
| 485 return (!(this.sitekeys && this.sitekeys.length) && | 485 return !(this.sitekeys && this.sitekeys.length) && |
|
Felix Dahlke
2015/09/28 08:28:45
Nit: Superfluous parentheses around the expression
kzar
2015/09/28 10:16:12
Done.
| |
| 486 (!this.domains || this.domains[""])); | 486 (!this.domains || this.domains[""]); |
| 487 }, | 487 }, |
| 488 | 488 |
| 489 /** | 489 /** |
| 490 * See Filter.serialize() | 490 * See Filter.serialize() |
| 491 */ | 491 */ |
| 492 serialize: function(buffer) | 492 serialize: function(buffer) |
| 493 { | 493 { |
| 494 if (this._disabled || this._hitCount || this._lastHit) | 494 if (this._disabled || this._hitCount || this._lastHit) |
| 495 { | 495 { |
| 496 Filter.prototype.serialize.call(this, buffer); | 496 Filter.prototype.serialize.call(this, buffer); |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1037 // several times on Safari, due to WebKit bug 132872 | 1037 // several times on Safari, due to WebKit bug 132872 |
| 1038 let prop = Object.getOwnPropertyDescriptor(this, "regexpString"); | 1038 let prop = Object.getOwnPropertyDescriptor(this, "regexpString"); |
| 1039 if (prop) | 1039 if (prop) |
| 1040 return prop.value; | 1040 return prop.value; |
| 1041 | 1041 |
| 1042 let regexp = Filter.toRegExp(this.regexpSource); | 1042 let regexp = Filter.toRegExp(this.regexpSource); |
| 1043 Object.defineProperty(this, "regexpString", {value: regexp}); | 1043 Object.defineProperty(this, "regexpString", {value: regexp}); |
| 1044 return regexp; | 1044 return regexp; |
| 1045 } | 1045 } |
| 1046 }; | 1046 }; |
| LEFT | RIGHT |