Skip to content

Instantly share code, notes, and snippets.

@salmanx
Created December 11, 2019 08:24
Show Gist options
  • Save salmanx/83efa853854d09f145e43d31fec67cf2 to your computer and use it in GitHub Desktop.
Save salmanx/83efa853854d09f145e43d31fec67cf2 to your computer and use it in GitHub Desktop.
// borrowed from https://getbootstrap.com/docs/4.4/getting-started/browsers-devices/
<script>
$(function () {
var nua = navigator.userAgent
var isAndroid = (nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Android ') > -1 && nua.indexOf('AppleWebKit') > -1 && nua.indexOf('Chrome') === -1)
if (isAndroid) {
// do stuff
}
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment