diff options
author | Pushkar Joshi | 2012-01-31 12:07:43 -0800 |
---|---|---|
committer | Pushkar Joshi | 2012-01-31 12:07:43 -0800 |
commit | c006b3e75d5e23da63687a04cd30bf56a3a8a80d (patch) | |
tree | 3be485ebd5519d6f74cfb2cc0757f57099e4b204 /index.html | |
parent | f0e3fa691b3c042c9fc49a7a0cde8ddf8100c195 (diff) | |
parent | 1d8af9fb2be85c33ce6a846f97360ba2ee17ea23 (diff) | |
download | ninja-c006b3e75d5e23da63687a04cd30bf56a3a8a80d.tar.gz |
Merge branch 'master' into pentool
Diffstat (limited to 'index.html')
-rw-r--r-- | index.html | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -168,11 +168,31 @@ | |||
168 | 168 | ||
169 | <script type="text/javascript"> | 169 | <script type="text/javascript"> |
170 | window.onload = function() { | 170 | window.onload = function() { |
171 | // Check if we are running in Chrome | ||
172 | if(navigator.userAgent.toLowerCase().indexOf("chrome") === -1) { | ||
173 | window.location = "./redirect.html"; | ||
174 | } | ||
175 | // Load the version json | ||
176 | var req = new XMLHttpRequest(); | ||
177 | req.open("GET", "versions.json"); | ||
178 | req.onreadystatechange = (function(req) { | ||
179 | return function(event) { | ||
180 | if (req.readyState === 4) { | ||
181 | if (req.status === 200) { | ||
182 | window.ninjaVersion = JSON.parse(req.responseText); | ||
183 | } else { | ||
184 | console.log("Ninja version file could not be loaded"); | ||
185 | } | ||
186 | } | ||
187 | } | ||
188 | })(req); | ||
189 | req.send(); | ||
171 | // | 190 | // |
172 | var star = document.getElementById('star'); | 191 | var star = document.getElementById('star'); |
173 | // | 192 | // |
174 | njstar(star.getContext("2d")); | 193 | njstar(star.getContext("2d")); |
175 | } | 194 | }; |
195 | |||
176 | function njstar (ctx) { | 196 | function njstar (ctx) { |
177 | ctx.save(); | 197 | ctx.save(); |
178 | ctx.translate(0,0); | 198 | ctx.translate(0,0); |