diff options
author | Valerio Virgillito | 2012-01-30 23:08:42 -0800 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-01-31 10:10:16 -0800 |
commit | 03242bec2ac79613472960673a87da86f5498431 (patch) | |
tree | d68052f896924a1b5a7b6b3051e26349a4d5b620 | |
parent | 43d53af9cade33cff20601dfbce8a16d7212fe20 (diff) | |
download | ninja-03242bec2ac79613472960673a87da86f5498431.tar.gz |
Adding browser check for Chrome and redirect page.
Adding a check for Google Chrome browser and a redirect page to download and install Chrome.
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
-rw-r--r-- | index.html | 4 | ||||
-rw-r--r-- | redirect.html | 23 |
2 files changed, 27 insertions, 0 deletions
@@ -168,6 +168,10 @@ | |||
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 | } | ||
171 | // Load the version json | 175 | // Load the version json |
172 | var req = new XMLHttpRequest(); | 176 | var req = new XMLHttpRequest(); |
173 | req.open("GET", "versions.json"); | 177 | req.open("GET", "versions.json"); |
diff --git a/redirect.html b/redirect.html new file mode 100644 index 00000000..cf602f58 --- /dev/null +++ b/redirect.html | |||
@@ -0,0 +1,23 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <!-- <copyright> | ||
3 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
4 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
5 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
6 | </copyright> --> | ||
7 | <html> | ||
8 | |||
9 | <head> | ||
10 | |||
11 | <title>Ninja - Browser support: Download Google Chrome</title> | ||
12 | |||
13 | </head> | ||
14 | |||
15 | <body> | ||
16 | |||
17 | <div> | ||
18 | <p>Your browser is not supported. Please download and install the latest version of <a href="https://www.google.com/chrome/">Google Chrome</a></p> | ||
19 | </div> | ||
20 | |||
21 | </body> | ||
22 | |||
23 | </html> \ No newline at end of file | ||