diff options
author | Chad Weider <cweider@oofn.net> | 2012-09-11 20:45:14 -0700 |
---|---|---|
committer | Chad Weider <cweider@oofn.net> | 2012-09-11 21:16:47 -0700 |
commit | b691606c4e014c75d986172b13c49834290cb876 (patch) | |
tree | d4ac507b7018386cdb8f7e7c5bd53a9ef92d9a21 /src/static/js/ace.js | |
parent | 1258ed3a0d676f60707e619af757d8b6b9270bfb (diff) | |
download | etherpad-lite-b691606c4e014c75d986172b13c49834290cb876.zip |
Replace ParentRequire hack.
Instead of hacking with the internals of require, make client_plugins aware
and capable of sharing behavior.
Diffstat (limited to 'src/static/js/ace.js')
-rw-r--r-- | src/static/js/ace.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/static/js/ace.js b/src/static/js/ace.js index 6bea8d22..db62deb4 100644 --- a/src/static/js/ace.js +++ b/src/static/js/ace.js @@ -241,10 +241,11 @@ require.setGlobalKeyPath("require");\n\ // Inject my plugins into my child. iframeHTML.push('\ -<script type="text/javascript">\ - parent_req = require("ep_etherpad-lite/static/js/pluginfw/parent_require");\ - parent_req.getRequirementFromParent(require, "ep_etherpad-lite/static/js/pluginfw/hooks");\ - parent_req.getRequirementFromParent(require, "ep_etherpad-lite/static/js/pluginfw/client_plugins");\ +<script type="text/javascript">\n\ + var hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks");\n\ + var plugins = require("ep_etherpad-lite/static/js/pluginfw/client_plugins");\n\ + hooks.plugins = plugins;\n\ + plugins.adoptPluginsFromAncestorsOf(window);\n\ </script>\ '); |