]> source.dussan.org Git - jquery.git/commitdiff
Clarified the use of jQuery.browser and enforced jQuery.browser.firefox matching...
authorJohn Resig <jeresig@gmail.com>
Wed, 9 Dec 2009 23:07:16 +0000 (15:07 -0800)
committerJohn Resig <jeresig@gmail.com>
Wed, 9 Dec 2009 23:07:16 +0000 (15:07 -0800)
src/core.js

index e0db81d8693852950f9dfe6220ee8066781c5b7a..90040f2b3667511c830af607c06e65f3f88fa08a 100644 (file)
@@ -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 ) {