OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * This Source Code is subject to the terms of the Mozilla Public License |
| 3 * version 2.0 (the "License"). You can obtain a copy of the License at |
| 4 * http://mozilla.org/MPL/2.0/. |
| 5 */ |
| 6 |
| 7 // |
| 8 // This file has been generated automatically from Adblock Plus source code |
| 9 // |
| 10 |
| 11 (function (_patchFunc1) { |
| 12 var listeners = []; |
| 13 var FilterNotifier = { |
| 14 addListener: function (listener) { |
| 15 if (listeners.indexOf(listener) >= 0) |
| 16 return ; |
| 17 listeners.push(listener); |
| 18 } |
| 19 , |
| 20 removeListener: function (listener) { |
| 21 var index = listeners.indexOf(listener); |
| 22 if (index >= 0) |
| 23 listeners.splice(index, 1); |
| 24 } |
| 25 , |
| 26 triggerListeners: function (action, item, param1, param2, param3) { |
| 27 for (var _loopIndex0 = 0; |
| 28 _loopIndex0 < listeners.length; ++ _loopIndex0) { |
| 29 var listener = listeners[_loopIndex0]; |
| 30 listener(action, item, param1, param2, param3); |
| 31 } |
| 32 } |
| 33 |
| 34 }; |
| 35 if (typeof _patchFunc1 != "undefined") |
| 36 eval("(" + _patchFunc1.toString() + ")()"); |
| 37 window.FilterNotifier = FilterNotifier; |
| 38 } |
| 39 )(window.FilterNotifierPatch); |
OLD | NEW |