Created
March 25, 2014 21:36
-
-
Save leobalter/9771910 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
// JavaScript Document | |
var browserName=navigator.appName; | |
if (browserName=="Netscape") | |
{ | |
} | |
else | |
{ | |
if (browserName=="Microsoft Internet Explorer") | |
{ | |
var browserVer=parseInt(navigator.appVersion); | |
var ua = navigator.userAgent; | |
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); | |
if (re.exec(ua) != null) { | |
rv = parseFloat( RegExp.$1 ); | |
if(rv == 6) { | |
document.write('<link href="/gam/control/css/browsers/amg_ie6.css" rel="stylesheet" type="text/css" />'); | |
} | |
if(rv == 7) { | |
document.write('<link href="/gam/control/css/browsers/amg_ie7.css" rel="stylesheet" type="text/css" />'); | |
} | |
/* if(rv == 8) { | |
document.getElementById("ie").href = "amg_ie8.css"; | |
}*/ | |
} | |
} | |
else | |
{ | |
alert("JS Error"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment