mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
beautified all static js files
This commit is contained in:
parent
2fa1d8768b
commit
271ee1776b
36 changed files with 9456 additions and 6035 deletions
|
@ -1,22 +1,26 @@
|
|||
plugins = {
|
||||
callHook: function (hookName, args) {
|
||||
callHook: function(hookName, args)
|
||||
{
|
||||
var hook = clientVars.hooks[hookName];
|
||||
if (hook === undefined)
|
||||
return [];
|
||||
if (hook === undefined) return [];
|
||||
var res = [];
|
||||
for (var i = 0, N=hook.length; i < N; i++) {
|
||||
for (var i = 0, N = hook.length; i < N; i++)
|
||||
{
|
||||
var plugin = hook[i];
|
||||
var pluginRes = eval(plugin.plugin)[plugin.original || hookName](args);
|
||||
if (pluginRes != undefined && pluginRes != null)
|
||||
res = res.concat(pluginRes);
|
||||
if (pluginRes != undefined && pluginRes != null) res = res.concat(pluginRes);
|
||||
}
|
||||
return res;
|
||||
},
|
||||
|
||||
callHookStr: function (hookName, args, sep, pre, post) {
|
||||
callHookStr: function(hookName, args, sep, pre, post)
|
||||
{
|
||||
if (sep == undefined) sep = '';
|
||||
if (pre == undefined) pre = '';
|
||||
if (post == undefined) post = '';
|
||||
return plugins.callHook(hookName, args).map(function (x) { return pre + x + post}).join(sep || "");
|
||||
return plugins.callHook(hookName, args).map(function(x)
|
||||
{
|
||||
return pre + x + post
|
||||
}).join(sep || "");
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue