aboutsummaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorValerio Virgillito2012-01-31 08:35:59 +0800
committerValerio Virgillito2012-01-30 17:16:44 -0800
commite7f43774b980313392bc1a203431e30958c6e366 (patch)
tree256bae139334dddc1ca761c7dc48aa3e617ff0b8 /index.html
parentf129a23ff0b69f27a05a07badcdbd10fb76b86b4 (diff)
downloadninja-e7f43774b980313392bc1a203431e30958c6e366.tar.gz
Adding a version json object to Ninja
Versions object to start keeping track of versions for Ninja, Montage and eventually other dependencies. Loaded before montage to use in the splash screen. Signed-off-by: Valerio Virgillito <rmwh84@motorola.com>
Diffstat (limited to 'index.html')
-rw-r--r--index.html18
1 files changed, 17 insertions, 1 deletions
diff --git a/index.html b/index.html
index 44f8ec7e..5fa4790c 100644
--- a/index.html
+++ b/index.html
@@ -168,11 +168,27 @@
168 168
169 <script type="text/javascript"> 169 <script type="text/javascript">
170 window.onload = function() { 170 window.onload = function() {
171 // Load the version json
172 var req = new XMLHttpRequest();
173 req.open("GET", "versions.json");
174 req.onreadystatechange = (function(req) {
175 return function(event) {
176 if (req.readyState === 4) {
177 if (req.status === 200) {
178 window.ninjaVersion = JSON.parse(req.responseText);
179 } else {
180 console.log("Ninja version file could not be loaded");
181 }
182 }
183 }
184 })(req);
185 req.send();
171 // 186 //
172 var star = document.getElementById('star'); 187 var star = document.getElementById('star');
173 // 188 //
174 njstar(star.getContext("2d")); 189 njstar(star.getContext("2d"));
175 } 190 };
191
176 function njstar (ctx) { 192 function njstar (ctx) {
177 ctx.save(); 193 ctx.save();
178 ctx.translate(0,0); 194 ctx.translate(0,0);