mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
Replace ParentRequire hack.
Instead of hacking with the internals of require, make client_plugins aware and capable of sharing behavior.
This commit is contained in:
parent
1258ed3a0d
commit
b691606c4e
4 changed files with 39 additions and 44 deletions
|
@ -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>\
|
||||
');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue