-
-
Save jbmyid/b03519cb6a791008df398a25620550db 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