aboutsummaryrefslogtreecommitdiffstats
path: root/src/core.js
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2009-12-09 11:46:07 +0800
committerJohn Resig <jeresig@gmail.com>2009-12-09 14:43:18 +0800
commitd3dc2d1234af10cb856519a01a97358eb4103008 (patch)
tree1947c9d65db9118b706a3d35a13da68cb3f811b9 /src/core.js
parent8d73fbd788705f5bec340a46ae0365325fd61b4a (diff)
downloadjquery-d3dc2d1234af10cb856519a01a97358eb4103008.tar.gz
jquery-d3dc2d1234af10cb856519a01a97358eb4103008.zip
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
Diffstat (limited to 'src/core.js')
-rw-r--r--src/core.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core.js b/src/core.js
index 8c623632d..81779fdb2 100644
--- a/src/core.js
+++ b/src/core.js
@@ -624,8 +624,8 @@ jQuery.extend({
// It's included for backwards compatibility and plugins,
// although they should work to migrate away.
browser: {
- version: (/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/.exec(userAgent) || [0,'0'])[1],
- safari: /webkit/.test( userAgent ),
+ version: (/.*?(?:firefox|safari|opera|msie)[\/ ]([\d.]+)/.exec(userAgent) || [0,'0'])[1],
+ safari: /safari/.test( userAgent ),
opera: /opera/.test( userAgent ),
msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )