Last active
August 13, 2019 05:07
-
-
Save DoubleCouponDay/ca0f03f5c3eb1449bd4d601714461ea7 to your computer and use it in GitHub Desktop.
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
| function isIOS() { | |
| let tester = new RegExp("/iPad|iPhone|iPod/") | |
| let IOSdetected = tester.test(navigator.userAgent) | |
| let msStreamNotUsed = isNullOrUndefined(window.MSStream) //prevent fake user agent in internet explorer | |
| if (IOSdetected === true && msStreamNotUsed) { | |
| return true | |
| } | |
| return false | |
| } | |
| function isNullOrUndefined(input) { | |
| return input === null || input === undefined | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment