Created
September 16, 2011 19:23
-
-
Save anonymous/1222889 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
if(window.ActiveXObject){ | |
var rv = -1; | |
var ua = navigator.userAgent; | |
var re = new RegExp("Trident\/([0-9]{1,}[\.0-9]{0,})"); | |
if (re.test(ua)) { | |
rv = parseFloat(RegExp.$1); | |
} | |
var msie8 = (rv == 4); | |
var msie7 = ((window.XMLHttpRequest && !msie8) ? true : false); | |
// var msie6 = (!!(window.attachEvent && navigator.userAgent.indexOf('Opera') === -1)) && /MSIE 6/i.test(navigator.userAgent); | |
// var msie6 = !(msie7 || msie8 || msie9); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment