Last active
April 16, 2018 03:11
-
-
Save sh78/bc074ca35be1d39b2c0f073ff4d72836 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
var detectDevices = { | |
iOS: function() { | |
return /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; | |
}, | |
Safari: function() { | |
return !!navigator.userAgent.match(/safari/i) && !navigator.userAgent.match(/chrome/i) && typeof document.body.style.webkitFilter !== "undefined" && !window.chrome; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment