mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
Allow modules to be fetched remotely.
This commit is contained in:
parent
b5ddba8741
commit
64ae1c433f
3 changed files with 7 additions and 1 deletions
|
@ -218,9 +218,11 @@ function Ace2Editor()
|
||||||
}
|
}
|
||||||
function pushRequireScriptTo(buffer) {
|
function pushRequireScriptTo(buffer) {
|
||||||
var KERNEL_SOURCE = '../static/js/require-kernel.js';
|
var KERNEL_SOURCE = '../static/js/require-kernel.js';
|
||||||
|
var KERNEL_BOOT = 'require.setRootURI("../minified/");\nrequire.setGlobalKeyPath("require");'
|
||||||
if (Ace2Editor.EMBEDED && Ace2Editor.EMBEDED[KERNEL_SOURCE]) {
|
if (Ace2Editor.EMBEDED && Ace2Editor.EMBEDED[KERNEL_SOURCE]) {
|
||||||
buffer.push('<script type="text/javascript">');
|
buffer.push('<script type="text/javascript">');
|
||||||
buffer.push(Ace2Editor.EMBEDED[KERNEL_SOURCE]);
|
buffer.push(Ace2Editor.EMBEDED[KERNEL_SOURCE]);
|
||||||
|
buffer.push(KERNEL_BOOT);
|
||||||
buffer.push('<\/script>');
|
buffer.push('<\/script>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -295,6 +295,8 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var clientVars = {};
|
var clientVars = {};
|
||||||
(function () {
|
(function () {
|
||||||
|
require.setRootURI("../minified/");
|
||||||
|
require.setGlobalKeyPath("require");
|
||||||
require('/pad').init();
|
require('/pad').init();
|
||||||
|
|
||||||
/* TODO: These globals shouldn't exist. */
|
/* TODO: These globals shouldn't exist. */
|
||||||
|
|
|
@ -204,7 +204,9 @@
|
||||||
<script type="text/javascript" >
|
<script type="text/javascript" >
|
||||||
var clientVars = {};
|
var clientVars = {};
|
||||||
(function () {
|
(function () {
|
||||||
var TimeSlider = require('/timeslider').init();
|
require.setRootURI("../minified/");
|
||||||
|
require.setGlobalKeyPath("require");
|
||||||
|
require('/timeslider').init();
|
||||||
|
|
||||||
/* TODO: These globals shouldn't exist. */
|
/* TODO: These globals shouldn't exist. */
|
||||||
padeditbar = require('/pad_editbar').padeditbar;
|
padeditbar = require('/pad_editbar').padeditbar;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue