aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2009-12-09 15:07:16 -0800
committerJohn Resig <jeresig@gmail.com>2009-12-09 15:07:16 -0800
commit9d8bd161b6548b33fe6c834a65bb1733c07ea29c (patch)
tree57e970037aaabda17e2abf16cbb58304e8af9403
parent3ec2f1aef6b137d0f639e2fc53f95352d24b9d90 (diff)
downloadjquery-9d8bd161b6548b33fe6c834a65bb1733c07ea29c.tar.gz
jquery-9d8bd161b6548b33fe6c834a65bb1733c07ea29c.zip
Clarified the use of jQuery.browser and enforced jQuery.browser.firefox matching Firefox, after the discussion in 17791c9a3e8a88e129a6956e7053b964d7b34778.
-rw-r--r--src/core.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core.js b/src/core.js
index e0db81d86..90040f2b3 100644
--- a/src/core.js
+++ b/src/core.js
@@ -621,19 +621,18 @@ jQuery.extend({
},
// Use of jQuery.browser is frowned upon.
- // It's included for backwards compatibility and plugins,
- // although they should work to migrate away.
+ // More details: http://docs.jquery.com/Utilities/jQuery.browser
browser: {
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 ),
- firefox: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
+ firefox: /firefox/.test( userAgent )
}
});
// Deprecated
-jQuery.browser.mozilla = jQuery.browser.firefox;
+jQuery.browser.mozilla = /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent );
if ( indexOf ) {
jQuery.inArray = function( elem, array ) {