Created
March 9, 2018 20:43
-
-
Save yacafx/7540ad7ab5e63375a83b754f6d71f551 to your computer and use it in GitHub Desktop.
Check user agent in JS
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
// Check if user agent is from Apple | |
if(/iPad|iPhone|iPod/.test(navigator.userAgent)){ | |
// actions | |
} else { | |
// Maybe is Android ;) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment