From 8d7965a607bf91ec6855b626ab3885cd3488d167 Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Thu, 7 Jan 2010 03:23:39 +0800 Subject: [PATCH 1/3] fixed typo in comments --- src/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.js b/src/core.js index 831570ed39..bcabc646ee 100644 --- a/src/core.js +++ b/src/core.js @@ -35,7 +35,7 @@ var jQuery = function( selector, context ) { // Keep a UserAgent string for use with jQuery.browser userAgent = navigator.userAgent, - // For matching the engine and version of thte browser + // For matching the engine and version of the browser browserMatch, // Has the ready events already been bound? From f14fadef7311ace7333b6522d4b6f44a9e54d6dc Mon Sep 17 00:00:00 2001 From: Paul Irish Date: Tue, 12 Jan 2010 10:30:02 +0800 Subject: [PATCH 2/3] adding extra useragents from trac tickets. correcting opera version --- test/data/ua.txt | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/test/data/ua.txt b/test/data/ua.txt index 4d415e6de4..b6a9dff662 100644 --- a/test/data/ua.txt +++ b/test/data/ua.txt @@ -198,7 +198,7 @@ mozilla 0 Mozilla/4.51 [en] (Win98; U) webkit 420 Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/420+ (KHTML, like Gecko, Safari) OmniWeb/v595 opera 6.0 Opera/6.0 (Windows 2000; U) [fr] opera 7.10 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.10 [en] -opera 9.80 Opera/9.80 (Windows NT 5.1; U; cs) Presto/2.2.15 Version/10.00 +opera 10.00 Opera/9.80 (Windows NT 5.1; U; cs) Presto/2.2.15 Version/10.00 opera 5.11 Opera/5.11 (Windows 98; U) [en] opera 9.51 Opera/9.51 (Macintosh; Intel Mac OS X; U; en) opera 6.01 Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 4.0) Opera 6.01 [en] @@ -253,3 +253,20 @@ webkit 1.1.10 Uzbl (U; Linux x86_64; en-GB) Webkit 1.1.10 webkit 103u Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/103u (KHTML, like Gecko) wKiosk/100 mozilla 1.9.0.9 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.9) Gecko/2009042410 Firefox/3.0.9 Wyzo/3.0.3 0 X-Smiles/1.2-20081113 +msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30; MEGAUPLOAD 2.0) +msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30) +mozilla 1.9.0.4 Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.0.4) Gecko/2008111217 Fedora/3.0.4-1.fc9 Firefox/3.0.4 +mozilla 1.9.0.4 Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4 +msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; .NET CLR 1.1.4322; FDM) +msie 6.0 mozilla/4.0 (compatible; msie 6.0; windows nt 5.1; mra 4.6 (build 01425); .net clr 2.0.50727) +msie 7.0 mozilla/4.0 (compatible; msie 7.0; windows nt 5.1; mra 4.9 (build 01863)) +msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath?.2; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; MS-RTC LM 8; .NET CLR 1.1.4322) +msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; InfoPath?.2; .NET CLR 3.5.21022) +msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Sky Broadband; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322) +msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; MS-RTC LM 8; .NET CLR 1.1.4322) +msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; InfoPath.2; .NET CLR 3.5.21022) +msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6; User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; http://bsalsa.com); .NET CLR 1.1.4322; .NET CLR 2.0.50727 +opera 10.00 Opera/9.80 (Macintosh; Intel Mac OS X; U; en) Presto/2.2.15 Version/10.00 +msie 8.0 Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; InfoPath?.2; .NET CLR 2.0.50727; CIBA; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) +opera 10.00 Opera/9.80 (X11; Linux x86_64; U; de) Presto/2.2.15 Version/10.00 +opera 10.50 Opera/9.80 (Macintosh; Intel Mac OS X; U; en) Presto/2.5.18 Version/10.50 From 7be5ec1248c749ece648c8d80a71b45320556381 Mon Sep 17 00:00:00 2001 From: Paul Irish Date: Tue, 12 Jan 2010 11:32:06 +0800 Subject: [PATCH 3/3] browser version detection revised for opera >= 10, which was reporting itself as 9.8 due to their new policy --- src/core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core.js b/src/core.js index bcabc646ee..467895f747 100644 --- a/src/core.js +++ b/src/core.js @@ -661,8 +661,8 @@ jQuery.extend({ ret = { browser: "webkit", version: /webkit[\/ ]([\w.]+)/ }; } else if ( /opera/.test( ua ) ) { - ret = { browser: "opera", version: /opera[\/ ]([\w.]+)/ }; - + ret = { browser: "opera", version: /version/.test( ua ) ? /version[\/ ]([\w.]+)/ : /opera[\/ ]([\w.]+)/ }; + } else if ( /msie/.test( ua ) ) { ret = { browser: "msie", version: /msie ([\w.]+)/ };