Created
November 14, 2013 10:00
-
-
Save argshook/7464315 to your computer and use it in GitHub Desktop.
Super tiny IE browser detection in javascript. Works as expected with IE 4, 5, 5.5, 6, 7, 8, 9 & 10. Also makes you warm inside.
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 isMSIE = /*@cc_on!@*/0; | |
if (isMSIE) { | |
document.body.style.background = "red"; //it's IE :( | |
} else { | |
document.body.style.background = "green"; //it's not IE! | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment