Created
December 14, 2012 07:23
-
-
Save anonymous/4283398 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
//выбираем для какой платформы загружать phonegap | |
var userAgent = navigator.userAgent.toLowerCase(); | |
if (userAgent.match(/android/)) { | |
document.write("<script src='scripts\/libs\/android\/phonegap.js'><\/script>"); | |
document.write("<script src='scripts\/libs\/android\/childbrowser.js'><\/script>"); | |
document.write("<script src='scripts\/libs\/android\/webintent.js'><\/script>"); | |
} | |
else if (userAgent.match(/iphone|ipad|ipod/)) { | |
document.write("<script src='scripts\/libs\/ios\/phonegap.js'><\/script>"); | |
document.write("<script src='scripts\/libs\/ios\/childbrowser.js'><\/script>"); | |
document.write("<script src='scripts\/libs\/ios\/email.js'><\/script>"); | |
} | |
else if (userAgent.match(/windows phone/)) { | |
document.write("<script src='scripts\/libs\/wp\/phonegap.js'><\/script>"); | |
document.write("<script src='scripts\/libs\/wp\/childbrowser.js'><\/script>"); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment