Created
May 18, 2011 06:16
-
-
Save realdeprez/978071 to your computer and use it in GitHub Desktop.
adds browser name+version class to html body tag
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
try{document.getElementsByTagName('body')[0].className+=' '+(/(Firefox|MSIE|Chrome|Safari|Opera)[\/\s](\d+)/).exec(navigator.userAgent).splice(1,2).join('').toLowerCase();}catch(e){} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add "Trident" in the option for IE 11.