aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindex.html40
-rw-r--r--manifest.json36
-rw-r--r--ninja_icon_128.pngbin0 -> 8742 bytes
-rw-r--r--versions.json8
4 files changed, 50 insertions, 34 deletions
diff --git a/index.html b/index.html
index 2fbf524a..de1d0b2e 100755
--- a/index.html
+++ b/index.html
@@ -125,21 +125,35 @@
125 if(navigator.userAgent.toLowerCase().indexOf("chrome") === -1) { 125 if(navigator.userAgent.toLowerCase().indexOf("chrome") === -1) {
126 window.location = "./redirect.html"; 126 window.location = "./redirect.html";
127 } 127 }
128 // Load the version json 128 window.ninjaVersion = {};
129 var req = new XMLHttpRequest(); 129 window.ninjaVersion.ninja = {};
130 req.open("GET", "versions.json"); 130 if (window.chrome.app.isInstalled) {
131 req.onreadystatechange = (function(req) { 131 // Ninja is running as an installed app, started via the app launcher.
132 return function(event) { 132 var info = chrome.app.getDetails();
133 if (req.readyState === 4) { 133 if(info) {
134 if (req.status === 200) { 134 window.ninjaVersion.ninja.version = info.version;
135 window.ninjaVersion = JSON.parse(req.responseText); 135 }
136 } else { 136 } else {
137 console.log("Ninja version file could not be loaded"); 137 // Ninja is running via a bookmark/link as a hosted web application.
138 // Load the version json
139 var req = new XMLHttpRequest();
140 req.open("GET", "manifest.json");
141 req.onreadystatechange = (function(req) {
142 return function(event) {
143 if (req.readyState === 4) {
144 if (req.status === 200) {
145 var manifestInfo = JSON.parse(req.responseText);
146 if(manifestInfo) {
147 window.ninjaVersion.ninja.version = manifestInfo.version;
148 }
149 } else {
150 console.log("Ninja version file could not be loaded");
151 }
138 } 152 }
139 } 153 }
140 } 154 })(req);
141 })(req); 155 req.send();
142 req.send(); 156 }
143 // 157 //
144 var star = document.getElementById('star'); 158 var star = document.getElementById('star');
145 // 159 //
diff --git a/manifest.json b/manifest.json
index 0ffea9b0..12047172 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,15 +1,25 @@
1{ 1{
2 "name": "Motorola Mobility Ninja", 2 "name": "Motorola Ninja",
3 "description": "Local Development Version", 3 "description": "Motorola Ninja HTML5 Authoring Tool Pre-Alpha",
4 "version": "0.0", 4 "version": "0.5.0.0",
5 "icons": {"128": "ninja_icon.png"}, 5 "app": {
6 "app": { 6 "launch": {
7 "launch": {"local_path": "index.html"} 7 "local_path": "index.html"
8 }, 8 }
9 "permissions": ["unlimitedStorage"], 9 },
10 "requirements": { 10 "icons": {
11 "3D": { 11 "128": "ninja_icon_128.png"
12 "features": ["css3d", "webgl"] 12 },
13 } 13 "permissions": [
14 } 14 "unlimitedStorage",
15 "notifications"
16 ],
17 "requirements": {
18 "3D": {
19 "features": ["css3d", "webgl"]
20 }
21 },
22 "minimum_chrome_version": "16.0.0.0",
23 "offline_enabled": true,
24 "update_url": "http://tetsubo.org/go/ninjaupdate"
15} \ No newline at end of file 25} \ No newline at end of file
diff --git a/ninja_icon_128.png b/ninja_icon_128.png
new file mode 100644
index 00000000..6f609f4a
--- /dev/null
+++ b/ninja_icon_128.png
Binary files differ
diff --git a/versions.json b/versions.json
deleted file mode 100644
index 017e22ce..00000000
--- a/versions.json
+++ /dev/null
@@ -1,8 +0,0 @@
1{
2 "ninja": {
3 "version": "0.5.5"
4 },
5 "montage": {
6 "version": "0.6.0"
7 }
8} \ No newline at end of file