forked from github/cordova-android
Updating JS
This commit is contained in:
parent
31bc015cdd
commit
64ff204371
@ -1,8 +1,8 @@
|
|||||||
// Platform: android
|
// Platform: android
|
||||||
|
|
||||||
// commit bbf1562d4934b1331ffb263424b6ae054cedeb71
|
// commit 104709b2130a29e7ad8596d1a6cee1ed48138803
|
||||||
|
|
||||||
// File generated at :: Thu Mar 21 2013 10:34:05 GMT-0700 (PDT)
|
// File generated at :: Wed Mar 27 2013 13:25:10 GMT-0700 (PDT)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Licensed to the Apache Software Foundation (ASF) under one
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
@ -6753,29 +6753,34 @@ window.cordova = require('cordova');
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Try to XHR the cordova_plugins.json file asynchronously.
|
// Try to XHR the cordova_plugins.json file asynchronously.
|
||||||
var xhr = new context.XMLHttpRequest();
|
try { // we commented we were going to try, so let us actually try and catch
|
||||||
xhr.onreadystatechange = function() {
|
var xhr = new context.XMLHttpRequest();
|
||||||
if (this.readyState != 4) { // not DONE
|
xhr.onreadystatechange = function() {
|
||||||
return;
|
if (this.readyState != 4) { // not DONE
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// If the response is a JSON string which composes an array, call handlePluginsObject.
|
// If the response is a JSON string which composes an array, call handlePluginsObject.
|
||||||
// If the request fails, or the response is not a JSON array, just call finishPluginLoading.
|
// If the request fails, or the response is not a JSON array, just call finishPluginLoading.
|
||||||
if (this.status == 200) {
|
if (this.status == 200) {
|
||||||
var obj = JSON.parse(this.responseText);
|
var obj = JSON.parse(this.responseText);
|
||||||
if (obj && obj instanceof Array && obj.length > 0) {
|
if (obj && obj instanceof Array && obj.length > 0) {
|
||||||
handlePluginsObject(obj);
|
handlePluginsObject(obj);
|
||||||
|
} else {
|
||||||
|
finishPluginLoading();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
finishPluginLoading();
|
finishPluginLoading();
|
||||||
}
|
}
|
||||||
} else {
|
};
|
||||||
finishPluginLoading();
|
xhr.open('GET', 'cordova_plugins.json', true); // Async
|
||||||
}
|
xhr.send();
|
||||||
};
|
}
|
||||||
xhr.open('GET', 'cordova_plugins.json', true); // Async
|
catch(err) {
|
||||||
xhr.send();
|
finishPluginLoading();
|
||||||
|
}
|
||||||
}(window));
|
}(window));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
Loading…
Reference in New Issue
Block a user