deprecate this
What I thought was a bug in the jQuery.browser, turns out to be a bug, but on a function that was deprecated (according to their nightly source) and therefore not likely to be fixed. The bug occurred when calling jQuery.browser.safari in Google Chrome. It would return true instead of false because the user agent had the word webkit in it (yes. That’s the browser sniffing method they use). Some simple methods work better than others.
I need browser detection so I can point users to helpful places when they have javascript disabled. Turns out my site is really broken when js is disabled. And when css is disabled as well, but that’s another problem. I made a quick and dirty jQuery plugin that includes konqueror, Google Chrome, and fixes the bug mentioned above.
Using it is as simple as :
$.browser.konqueror
$.browser.chrome
But don’t take my word for it. Try out the demo and view the source! It’s under the MIT license. It’s not included in the source because it is just too much overhead.