Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: assets/js/FilterNotifier.jsm

Issue 8482109: ABP/Android JavaScript code (Closed)
Patch Set: ABP/Android JavaScript code Created Nov. 12, 2012, 9:32 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: assets/js/FilterNotifier.jsm
===================================================================
new file mode 100755
--- /dev/null
+++ b/assets/js/FilterNotifier.jsm
@@ -0,0 +1,39 @@
+/*
+ * This Source Code is subject to the terms of the Mozilla Public License
+ * version 2.0 (the "License"). You can obtain a copy of the License at
+ * http://mozilla.org/MPL/2.0/.
+ */
+
+//
+// This file has been generated automatically from Adblock Plus source code
+//
+
+(function (_patchFunc1) {
+ var listeners = [];
+ var FilterNotifier = {
+ addListener: function (listener) {
+ if (listeners.indexOf(listener) >= 0)
+ return ;
+ listeners.push(listener);
+ }
+ ,
+ removeListener: function (listener) {
+ var index = listeners.indexOf(listener);
+ if (index >= 0)
+ listeners.splice(index, 1);
+ }
+ ,
+ triggerListeners: function (action, item, param1, param2, param3) {
+ for (var _loopIndex0 = 0;
+ _loopIndex0 < listeners.length; ++ _loopIndex0) {
+ var listener = listeners[_loopIndex0];
+ listener(action, item, param1, param2, param3);
+ }
+ }
+
+ };
+ if (typeof _patchFunc1 != "undefined")
+ eval("(" + _patchFunc1.toString() + ")()");
+ window.FilterNotifier = FilterNotifier;
+}
+)(window.FilterNotifierPatch);

Powered by Google App Engine
This is Rietveld