1/*global $, jQuery*/ 2/*global navigator*/ 3var matched, browser; 4jQuery.uaMatch = function (ua) { 5 'use strict'; 6 ua = ua.toLowerCase(); 7 var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || 8 /(webkit)[ \/]([\w.]+)/.exec(ua) || 9 /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || 10 /(msie) ([\w.]+)/.exec(ua) || 11 ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || []; 12 return { 13 browser: match[1] || "", 14 version: match[2] || "0" 15 }; 16}; 17matched = jQuery.uaMatch(navigator.userAgent); 18browser = {}; 19if (matched.browser) { 20 browser[matched.browser] = true; 21 browser.version = matched.version; 22} 23// Chrome is Webkit, but Webkit is also Safari. 24if (browser.chrome) { 25 browser.webkit = true; 26} else if (browser.webkit) { 27 browser.safari = true; 28} 29jQuery.browser = browser;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.