You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/06/29 03:29:22 UTC
spec commit: Remove xhr-based cordova.platform.js loading since it
breaks cordova_plugins.json loading
Updated Branches:
refs/heads/master 146e09380 -> c61dc14ff
Remove xhr-based cordova.platform.js loading since it breaks cordova_plugins.json loading
Project: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/commit/c61dc14f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/c61dc14f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/c61dc14f
Branch: refs/heads/master
Commit: c61dc14ff1b213e1aae92b8ee9ccc3ff31153ec4
Parents: 146e093
Author: Andrew Grieve <ag...@chromium.org>
Authored: Fri Jun 28 21:28:01 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri Jun 28 21:28:01 2013 -0400
----------------------------------------------------------------------
cordova-incl.js | 26 +-------------------------
1 file changed, 1 insertion(+), 25 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/c61dc14f/cordova-incl.js
----------------------------------------------------------------------
diff --git a/cordova-incl.js b/cordova-incl.js
index a82c590..d08ff08 100644
--- a/cordova-incl.js
+++ b/cordova-incl.js
@@ -39,31 +39,7 @@ var PLAT;
var scripts = document.getElementsByTagName('script');
var currentPath = scripts[scripts.length - 1].src;
-var platformCordovaPath = currentPath.replace("cordova-incl.js", "cordova." + PLAT + ".js");
-var normalCordovaPath = currentPath.replace("cordova-incl.js", "cordova.js");
-var cordovaPath = normalCordovaPath;
-
-if (PLAT) {
- // XHR to local file is an error on some platforms, windowsphone for one
- try {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", platformCordovaPath, false);
- xhr.onreadystatechange = function() {
-
- if (this.readyState == this.DONE && this.responseText.length > 0) {
- if(parseInt(this.status) >= 400){
- cordovaPath = normalCordovaPath;
- }else{
- cordovaPath = platformCordovaPath;
- }
- }
- };
- xhr.send(null);
- }
- catch(e){
- cordovaPath = normalCordovaPath;
- } // access denied!
-}
+var cordovaPath = currentPath.replace("cordova-incl.js", "cordova.js");
if (!window._doNotWriteCordovaScript) {
if (PLAT != "windows8") {