Sha256: ba6ee6abb4385598fca99bd5806e1eed3e3727c559b0447b8be3068320346616
Contents?: true
Size: 1.45 KB
Versions: 11
Compression:
Stored size: 1.45 KB
Contents
// ========================================================================== // Project: SproutCore - JavaScript Application Framework // Copyright: ©2006-2010 Sprout Systems, Inc. and contributors. // Portions ©2008-2010 Apple Inc. All rights reserved. // License: Licensed under MIT license (see license.js) // ========================================================================== var SC = SC || { BUNDLE_INFO: {}, LAZY_INSTANTIATION: {} }; SC.browser = (function() { var userAgent = navigator.userAgent.toLowerCase(), version = (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1] ; var browser = { version: version, safari: (/webkit/).test( userAgent ) ? version : 0, opera: (/opera/).test( userAgent ) ? version : 0, msie: (/msie/).test( userAgent ) && !(/opera/).test( userAgent ) ? version : 0, mozilla: (/mozilla/).test( userAgent ) && !(/(compatible|webkit)/).test( userAgent ) ? version : 0, mobileSafari: (/apple.*mobile.*safari/).test(userAgent) ? version : 0, chrome: (/chrome/).test( userAgent ) ? version : 0, windows: !!(/(windows)/).test(userAgent), mac: !!((/(macintosh)/).test(userAgent) || (/(mac os x)/).test(userAgent)), language: (navigator.language || navigator.browserLanguage).split('-', 1)[0] }; browser.current = browser.msie ? 'msie' : browser.mozilla ? 'mozilla' : browser.safari ? 'safari' : browser.opera ? 'opera' : 'unknown' ; return browser ; })();
Version data entries
11 entries across 11 versions & 1 rubygems