diff options
Diffstat (limited to 'phonegap/www/cordova-independent.js')
-rw-r--r-- | phonegap/www/cordova-independent.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/phonegap/www/cordova-independent.js b/phonegap/www/cordova-independent.js new file mode 100644 index 000000000..775ef4e4f --- /dev/null +++ b/phonegap/www/cordova-independent.js @@ -0,0 +1,12 @@ +(function () { + var scriptElement = document.createElement("script"); + scriptElement.type = "text/javascript"; + if (navigator.userAgent.match(/(iPhone|iPod|iPad)/)) { + scriptElement.src = 'cordova-ios-2.1.0.js'; + } else if (navigator.userAgent.match(/Android/)) { + scriptElement.src = 'cordova-android-2.1.0.js'; + } else { + alert("Unknown platform - userAgent is: " + userAgent); + } + $('head').prepend(scriptElement); +})(); |