mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
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
This commit is contained in:
parent
8d73fbd788
commit
d3dc2d1234
@ -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 )
|
||||||
|
Loading…
Reference in New Issue
Block a user