I too miss the $.browser detection of jQuery. While I understand that $.support makes more sense for many cases, I initially used browser detection to get a css prefix property, which can make more sense when it comes to apply conditional styling, instead of using all 3 prefixes. Or even add the -pie- prefix for IE 6-9 which is solely based on IE's version.
Here is the model for the function I'll be using, adapted from jQuery's deprecated $.browser, if that can help.
nav = navigation;
nav.detectBrowser = function() {
var t = this,
a = this.userAgent.toLowerCase(),
match = /(chrome)[ \/]([\w.]+)/.exec(a) ||
/(webkit)[ \/]([\w.]+)/.exec(a) ||
/(firefox)[ \/]([\w.]+)/.exec(a) ||
/(msie) ([\w.]+)/.exec(a) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a) ||
a.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a) || [];
t.browser = match[1] || false;
t.version = match[2] || "0";
if (t.browser) t[match[1]] = true;
if (t.msie)
t.ie = parseInt(t.version);//ie main version or false if not IE
else if (t.chrome)
t.webkit = true;//chrome is webkit
else if (t.webkit)
t.safari = true;
t.pre = t.webkit ? '-webkit-' : t.firefox ? '-moz-' : t.ie > 7
? '-ms-' : t.opera ? '-o-' : '';//css prefix
}
nav.detectBrowser();
Note I use the window.navigation global object for the example, where your old $.browser object would now be 'nav' or 'window.nav'. nav.pre is the browser prefix for css3 features and nav.ie is the integer of the Internet Explorer version if it's IE.