Created
January 7, 2021 08:42
-
-
Save bongofury/87a6197d3461d0c0cf8327e42bb081b8 to your computer and use it in GitHub Desktop.
Super simple IE browser check
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
const ua = window?.navigator?.userAgent; | |
if (ua && (ua.indexOf('MSIE') > -1 || ua.indexOf('Trident/') > -1)) { | |
console.log('IE 😢'); | |
} else { | |
console.log('Happy surfing! 🙂') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment