aboutsummaryrefslogtreecommitdiff
path: root/js/io/system/ninjalibrary.js
diff options
context:
space:
mode:
authorArmen Kesablyan2012-05-14 11:45:11 -0700
committerArmen Kesablyan2012-05-14 11:45:11 -0700
commit9e6c0a247bd2f14d92278bcd97fff40277b71667 (patch)
tree4194388c03814b9168922dbf2907edf426295874 /js/io/system/ninjalibrary.js
parent9fc3b70bf57e10846e71808c6041fbc339a435d1 (diff)
parent27f4cacb39de1c2e3910748dadc9fc16d0655480 (diff)
downloadninja-9e6c0a247bd2f14d92278bcd97fff40277b71667.tar.gz
Merge branch 'refs/heads/masterDomArc' into binding
Diffstat (limited to 'js/io/system/ninjalibrary.js')
-rw-r--r--js/io/system/ninjalibrary.js28
1 files changed, 12 insertions, 16 deletions
diff --git a/js/io/system/ninjalibrary.js b/js/io/system/ninjalibrary.js
index 78bdbe53..3de5fb69 100644
--- a/js/io/system/ninjalibrary.js
+++ b/js/io/system/ninjalibrary.js
@@ -152,7 +152,8 @@ exports.NinjaLibrary = Montage.create(Object.prototype, {
152 // 152 //
153 this.chromeApi = chrome; 153 this.chromeApi = chrome;
154 // 154 //
155 var i, l, libs, libjson, xhr = new XMLHttpRequest(), tocopylibs = [], copied; 155// debugger;
156 var i, l, libs, libjson, xhr = new XMLHttpRequest(), tocopylibs = [];
156 //Getting known json list of libraries to copy to chrome 157 //Getting known json list of libraries to copy to chrome
157 xhr.open("GET", '/js/io/system/ninjalibrary.json', false); 158 xhr.open("GET", '/js/io/system/ninjalibrary.json', false);
158 xhr.send(); 159 xhr.send();
@@ -166,23 +167,18 @@ exports.NinjaLibrary = Montage.create(Object.prototype, {
166 if (chromeLibs.length > 0) { 167 if (chromeLibs.length > 0) {
167 // 168 //
168 for (i=0; chromeLibs[i]; i++) { 169 for (i=0; chromeLibs[i]; i++) {
169 copied = false;
170 for (var j in libs.libraries) { 170 for (var j in libs.libraries) {
171 if (String(libs.libraries[j].name+libs.libraries[j].version).toLowerCase() === chromeLibs[i]) { 171 if (String(libs.libraries[j].name+libs.libraries[j].version).toLowerCase() === chromeLibs[i]) {
172 copied = true; 172 //TODO: Remove, currently manually removing copied libraries
173 } 173 // //this.chromeApi.directoryDelete(chromeLibs[i]);
174 } 174 } else {
175 // 175 if (libs.libraries[j].file) {
176 if (!copied) { 176 tocopylibs.push({name: String(libs.libraries[j].name+libs.libraries[j].version).toLowerCase(), path: libs.libraries[j].path, file: libs.libraries[j].file});
177 if (libs.libraries[j].file) { 177 } else {
178 tocopylibs.push({name: String(libs.libraries[j].name+libs.libraries[j].version).toLowerCase(), path: libs.libraries[j].path, file: libs.libraries[j].file}); 178 tocopylibs.push({name: String(libs.libraries[j].name+libs.libraries[j].version).toLowerCase(), path: libs.libraries[j].path});
179 } else { 179 }
180 tocopylibs.push({name: String(libs.libraries[j].name+libs.libraries[j].version).toLowerCase(), path: libs.libraries[j].path}); 180 }
181 } 181 }
182 } else {
183 //TODO: Remove, currently manually removing copied libraries
184 //this.chromeApi.directoryDelete(chromeLibs[i]);
185 }
186 } 182 }
187 183
188 } else { 184 } else {