summaryrefslogtreecommitdiff
path: root/src/static/js/plugins.js
diff options
context:
space:
mode:
authorEgil Moeller <egil.moller@freecode.no>2012-03-01 19:22:02 +0100
committerEgil Moeller <egil.moller@freecode.no>2012-03-01 19:22:02 +0100
commitdf531a7b2bf115f51f2a3bb41f30d2e078bbd55f (patch)
treed83c344f7d4974579620441850d8c1698afa1413 /src/static/js/plugins.js
parent81440cd85605c3e584cba18cf868bab1629c63ba (diff)
downloadetherpad-lite-df531a7b2bf115f51f2a3bb41f30d2e078bbd55f.zip
Made ace actually use the new hooks system, and removed remnants of old system
Diffstat (limited to 'src/static/js/plugins.js')
-rw-r--r--src/static/js/plugins.js37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/static/js/plugins.js b/src/static/js/plugins.js
deleted file mode 100644
index 3e226eba..00000000
--- a/src/static/js/plugins.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * This code is mostly from the old Etherpad. Please help us to comment this code.
- * This helps other people to understand this code better and helps them to improve it.
- * TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
- */
-
-var plugins = {
- callHook: function(hookName, args)
- {
- var global = (function () {return this}());
- var hook = ((global.clientVars || {}).hooks || {})[hookName];
- if (hook === undefined) return [];
- var res = [];
- 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);
- }
- return res;
- },
-
- callHookStr: function(hookName, args, sep, pre, post)
- {
- if (sep == undefined) sep = '';
- if (pre == undefined) pre = '';
- if (post == undefined) post = '';
- var newCallhooks = [];
- var callhooks = plugins.callHook(hookName, args);
- for (var i = 0, ii = callhooks.length; i < ii; i++) {
- newCallhooks[i] = pre + callhooks[i] + post;
- }
- return newCallhooks.join(sep || "");
- }
-};
-
-exports.plugins = plugins;