scratch – Blame information for rev 117
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
117 | office | 1 | /*========================= |
2 | Plugins API. Collect all and init all plugins |
||
3 | ===========================*/ |
||
4 | s._plugins = []; |
||
5 | for (var plugin in s.plugins) { |
||
6 | var p = s.plugins[plugin](s, s.params[plugin]); |
||
7 | if (p) s._plugins.push(p); |
||
8 | } |
||
9 | // Method to call all plugins event/method |
||
10 | s.callPlugins = function (eventName) { |
||
11 | for (var i = 0; i < s._plugins.length; i++) { |
||
12 | if (eventName in s._plugins[i]) { |
||
13 | s._plugins[i][eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); |
||
14 | } |
||
15 | } |
||
16 | }; |