Parse an HTTP User-Agent header string and get a bunch of CSS classes back identifying the browser and OS of the client. That's it. Nothing more.
Installation and Usage
If you use Rails, add this to your Gemfile:
In your view code, e.g.:
<body class="<%= useragent2css %>">
<body class="webkit chrome chrome16 mac">
gem install useragent2css
And in your view code, e.g.:
<body class="<%= UserAgent.css(request["HTTP_USER_AGENT"]) %>">
LATimes - for the original ruby implementation.
Copyright (c) 2012 Lawrence Pit. See MIT-LICENSE for details.