Do not assign to globals until after initialization.

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

View File

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