Implement `require` in HTML pages.
parent
86f31c752d
commit
1b89e7e290
|
@ -340,5 +340,13 @@
|
||||||
<input type="hidden" class="missedChanges" name="missedChanges"/>
|
<input type="hidden" class="missedChanges" name="missedChanges"/>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/* TODO: These globals shouldn't exist. */
|
||||||
|
pad = require('/pad2').pad;
|
||||||
|
chat = require('/chat').chat;
|
||||||
|
padeditbar = require('/pad_editbar').padeditbar;
|
||||||
|
padimpexp = require('/pad_impexp').padimpexp;
|
||||||
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -21,6 +21,10 @@
|
||||||
|
|
||||||
var require = (function (path) {return (function () {return this}())});
|
var require = (function (path) {return (function () {return this}())});
|
||||||
|
|
||||||
|
/* TODO: These globals shouldn't exist. */
|
||||||
|
padeditbar = require('/pad_editbar').padeditbar;
|
||||||
|
padimpexp = require('/pad_impexp').padimpexp;
|
||||||
|
|
||||||
function createCookie(name,value,days)
|
function createCookie(name,value,days)
|
||||||
{
|
{
|
||||||
if (days) {
|
if (days) {
|
||||||
|
@ -143,9 +147,9 @@
|
||||||
clientVars = message.data;
|
clientVars = message.data;
|
||||||
|
|
||||||
//load all script that doesn't work without the clientVars
|
//load all script that doesn't work without the clientVars
|
||||||
loadBroadcastSliderJS();
|
require('/broadcast_slider').loadBroadcastSliderJS();
|
||||||
loadBroadcastRevisionsJS();
|
require('/broadcast_revisions').loadBroadcastRevisionsJS();
|
||||||
loadBroadcastJS();
|
require('/broadcast').loadBroadcastJS();
|
||||||
|
|
||||||
//initialize export ui
|
//initialize export ui
|
||||||
padimpexp.init();
|
padimpexp.init();
|
||||||
|
|
Loading…
Reference in New Issue