| 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-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 } | 50 } |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 function Notifier() | 53 function Notifier() |
| 54 { | 54 { |
| 55 this._eventEmitter = new EventEmitter(); | 55 this._eventEmitter = new EventEmitter(); |
| 56 } | 56 } |
| 57 Notifier.prototype = { | 57 Notifier.prototype = { |
| 58 addListener: function(listener) | 58 addListener: function(listener) |
| 59 { | 59 { |
| 60 var listeners = this._eventEmitter[""]; | 60 var listeners = this._eventEmitter._listeners[""]; |
|
Thomas Greiner
2016/03/22 13:29:40
Detail: Shouldn't this be `var listeners = this._e
Sebastian Noack
2016/03/22 14:24:10
Well spotted, and actually it is a bug.
| |
| 61 if (!listeners || listener.indexOf(listener) == -1) | 61 if (!listeners || listener.indexOf(listener) == -1) |
| 62 this._eventEmitter.on("", listener); | 62 this._eventEmitter.on("", listener); |
| 63 }, | 63 }, |
| 64 removeListener: function(listener) | 64 removeListener: function(listener) |
| 65 { | 65 { |
| 66 this._eventEmitter.off("", listener); | 66 this._eventEmitter.off("", listener); |
| 67 }, | 67 }, |
| 68 triggerListeners: function() | 68 triggerListeners: function() |
| 69 { | 69 { |
| 70 var args = Array.prototype.slice.apply(arguments); | 70 var args = Array.prototype.slice.apply(arguments); |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 492 | 492 |
| 493 if (params.safariContentBlocker) | 493 if (params.safariContentBlocker) |
| 494 { | 494 { |
| 495 global.safari = { | 495 global.safari = { |
| 496 extension: { | 496 extension: { |
| 497 setContentBlocker: function() {} | 497 setContentBlocker: function() {} |
| 498 } | 498 } |
| 499 }; | 499 }; |
| 500 } | 500 } |
| 501 })(this); | 501 })(this); |
| LEFT | RIGHT |