jquery core: closes #3179. Fallback browser version for non supported browsers.

This commit is contained in:
Ariel Flesler 2008-07-23 15:21:27 +00:00
parent fa13d6009d
commit 43c4b64f32

View File

@ -1221,7 +1221,7 @@ var userAgent = navigator.userAgent.toLowerCase();
// Figure out what browser is being used // Figure out what browser is being used
jQuery.browser = { jQuery.browser = {
version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1], version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1],
safari: /webkit/.test( userAgent ), safari: /webkit/.test( userAgent ),
opera: /opera/.test( userAgent ), opera: /opera/.test( userAgent ),
msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ), msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),