diff options
author | Ananya Sen | 2012-01-31 07:00:49 -0800 |
---|---|---|
committer | Ananya Sen | 2012-01-31 07:00:49 -0800 |
commit | 61ff730a1897890f71403cbfac4d15269e2d271f (patch) | |
tree | 4a2893e935c259ec9fbe9446d64af5172ec6299d /index.html | |
parent | 906776893138257f96a0530674eda456ca3d817b (diff) | |
parent | 6dc03672707a91085954359d82c14bd876f85b12 (diff) | |
download | ninja-61ff730a1897890f71403cbfac4d15269e2d271f.tar.gz |
Merge branch 'FileIO' of github.com:joseeight/ninja-internal into FileIO
Conflicts:
_scss/imports/scss/_Stage.scss
js/io/system/coreioapi.js
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'index.html')
-rwxr-xr-x | index.html | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -169,11 +169,27 @@ | |||
169 | 169 | ||
170 | <script type="text/javascript"> | 170 | <script type="text/javascript"> |
171 | window.onload = function() { | 171 | window.onload = function() { |
172 | // Load the version json | ||
173 | var req = new XMLHttpRequest(); | ||
174 | req.open("GET", "versions.json"); | ||
175 | req.onreadystatechange = (function(req) { | ||
176 | return function(event) { | ||
177 | if (req.readyState === 4) { | ||
178 | if (req.status === 200) { | ||
179 | window.ninjaVersion = JSON.parse(req.responseText); | ||
180 | } else { | ||
181 | console.log("Ninja version file could not be loaded"); | ||
182 | } | ||
183 | } | ||
184 | } | ||
185 | })(req); | ||
186 | req.send(); | ||
172 | // | 187 | // |
173 | var star = document.getElementById('star'); | 188 | var star = document.getElementById('star'); |
174 | // | 189 | // |
175 | njstar(star.getContext("2d")); | 190 | njstar(star.getContext("2d")); |
176 | } | 191 | }; |
192 | |||
177 | function njstar (ctx) { | 193 | function njstar (ctx) { |
178 | ctx.save(); | 194 | ctx.save(); |
179 | ctx.translate(0,0); | 195 | ctx.translate(0,0); |