Last active
August 29, 2015 14:00
-
-
Save newmanbrad/ee2c51dd156f5afbbc8b to your computer and use it in GitHub Desktop.
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> | |
window.ondevicemotion = function(event) { | |
if (navigator.platform.indexOf("This device is an iPad") != -1) { | |
var version = 1; | |
if (event.acceleration) version += window.devicePixelRatio; | |
document.getElementById('info').innerHTML = version; | |
} | |
window.ondevicemotion = null; | |
} | |
</script> | |
<p>iPad <span id="info">- This device is not iPad!</span></p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment