Created
January 28, 2015 12:37
-
-
Save jbasinger/35cc88069a077e603640 to your computer and use it in GitHub Desktop.
Cordova Popup Fixes
This file contains 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" src="cordova.js"></script>--> | |
<script type="text/javascript"> | |
if (navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/)) { | |
var script = document.createElement("script"); | |
script.type = "text/javascript"; | |
script.src = "cordova.js"; | |
document.getElementsByTagName("body")[0].appendChild(script); | |
script = null; | |
} | |
</script> |
This file contains 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
if (navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/)) { | |
document.addEventListener("deviceready", onDeviceReady, false); | |
} else { | |
onDeviceReady(); | |
} | |
function onDeviceReady() { | |
//Cordova is ready to rock | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment