1function detect() { 2 var ua = navigator.userAgent.toLowerCase() 3 var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || 4 /(webkit)[ \/]([\w.]+)/.exec( ua ) || 5 /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || 6 /(msie) ([\w.]+)/.exec( ua ) || 7 ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || 8 [] 9 var sp = /(iphone|ipod|ipad|android|blackberry|webos|windows phone)/.exec( ua ) 10 var pc = /(mac|win|linux)/.exec( ua ) 11 match[ 1 ] && $('html').addClass(match[ 1 ] || ''); 12 sp && sp[ 0 ] && $('html').addClass(sp[ 0 ] || '') || pc && pc[ 0 ] && $('html').addClass(pc[ 0 ] || '') 13 return { 14 os: sp && sp[ 0 ] || pc && pc[ 0 ], 15 browser: match[ 1 ] || "", 16 version: match[ 2 ] || "0" 17 } 18} 19var browser = { 20 os: detect().os, 21 browser: detect().browser, 22 version: detect().version, 23 isIOS: detect().os === 'iphone' || detect().os === 'ipad' || detect().os === 'ipod', 24 isAndroid: detect().os === 'android', 25 isMobile: detect().os === 'iphone' || detect().os === 'ipad' || detect().os === 'ipod' || detect().os === 'android' || detect().os === 'blackberry' || detect().os === 'webos' || detect().os === 'windows phone', 26 isMac: detect().os === 'mac', 27 isWin: detect().os === 'win', 28 isLinux: detect().os === 'linux', 29 isChrome: detect().browser === 'chrome', 30 isWebkit: detect().browser === 'webkit', 31 isSafari: detect().browser === 'webkit', 32 isOpera: detect().browser === 'opera', 33 isIE: detect().browser === 'msie', 34 isMozilla: detect().browser === 'mozilla', 35 isFirefox: detect().browser === 'mozilla', 36};
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.