Do not assign to globals until after initialization.

pull/405/head
Chad Weider 2012-01-30 19:24:50 -08:00
parent 4bf9b0c805
commit 3123a0a25a
2 changed files with 11 additions and 14 deletions

View File

@ -11,9 +11,6 @@
<link href="../static/custom/pad.css" rel="stylesheet">
<style title="dynamicsyntax"></style>
<script>
var clientVars = {};
</script>
<script src="../static/js/require-kernel.js"></script>
<script src="../socket.io/socket.io.js"></script>
<script src="../minified/pad.js"></script>
@ -297,14 +294,15 @@
</div>
<script>
/* TODO: These globals shouldn't exist. */
pad = require('/pad').pad;
chat = require('/chat').chat;
padeditbar = require('/pad_editbar').padeditbar;
padimpexp = require('/pad_impexp').padimpexp;
var clientVars = {};
(function () {
require('/pad').init();
/* TODO: These globals shouldn't exist. */
pad = require('/pad').pad;
chat = require('/chat').chat;
padeditbar = require('/pad_editbar').padeditbar;
padimpexp = require('/pad_impexp').padimpexp;
}());
</script>

View File

@ -205,13 +205,12 @@
<script>
var clientVars = {};
/* TODO: These globals shouldn't exist. */
padeditbar = require('/pad_editbar').padeditbar;
padimpexp = require('/pad_impexp').padimpexp;
(function () {
var TimeSlider = require('/timeslider').init();
/* TODO: These globals shouldn't exist. */
padeditbar = require('/pad_editbar').padeditbar;
padimpexp = require('/pad_impexp').padimpexp;
})();
</script>
</body>