Created
February 13, 2024 07:05
-
-
Save getneerajk/446b2e4e642c447e33db2bcbaf3e7acd to your computer and use it in GitHub Desktop.
Check if current browser is Safari iOS
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
var ua = window.navigator.userAgent; | |
var iOS = ua.match(/iPad/i) || ua.match(/iPhone/i); | |
var webkit = ua.match(/WebKit/i); | |
var iOSSafari = iOS && webkit && !ua.match(/CriOS/i); | |
console.log("ios: "+ iOS + " | webkit: "+ webkit +" | ios safari: "+ iOSSafari); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment