Skip to content

Instantly share code, notes, and snippets.

@leobalter
Created March 25, 2014 21:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leobalter/9771910 to your computer and use it in GitHub Desktop.
Save leobalter/9771910 to your computer and use it in GitHub Desktop.
// 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