Commit d3dc2d12 authored by Dave Methvin's avatar Dave Methvin Committed by John Resig

Get browser version rather than rendering engine version.

Don't recognize Chrome as Safari.
See results of different userAgent strings here:
http://spreadsheets.google.com/ccc?key=0Aj5JJFjq9rZDdHdxXzRLVnY0SzFpRTBOUDc4VmhzRVE
parent 8d73fbd7
...@@ -624,8 +624,8 @@ jQuery.extend({ ...@@ -624,8 +624,8 @@ jQuery.extend({
// It's included for backwards compatibility and plugins, // It's included for backwards compatibility and plugins,
// although they should work to migrate away. // although they should work to migrate away.
browser: { browser: {
version: (/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/.exec(userAgent) || [0,'0'])[1], version: (/.*?(?:firefox|safari|opera|msie)[\/ ]([\d.]+)/.exec(userAgent) || [0,'0'])[1],
safari: /webkit/.test( userAgent ), safari: /safari/.test( userAgent ),
opera: /opera/.test( userAgent ), opera: /opera/.test( userAgent ),
msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ), msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent ) mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment