1(function() { 2 function isTouchDevice() { 3 return (('ontouchstart' in window) || 4 (navigator.MaxTouchPoints > 0) || 5 (navigator.msMaxTouchPoints > 0)); 6 } 7 8 window.gemSettings.isTouch = isTouchDevice(); 9 10 function userAgentDetection() { 11 var ua = navigator.userAgent.toLowerCase(), 12 platform = navigator.platform.toLowerCase(), 13 UA = ua.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/) || [null, 'unknown', 0], 14 mode = UA[1] == 'ie' && document.documentMode; 15 16 window.gemBrowser = { 17 name: (UA[1] == 'version') ? UA[3] : UA[1], 18 version: UA[2], 19 platform: { 20 name: ua.match(/ip(?:ad|od|hone)/) ? 'ios' : (ua.match(/(?:webos|android)/) || platform.match(/mac|win|linux/) || ['other'])[0] 21 } 22 }; 23 } 24 25 window.updateGemClientSize = function() { 26 if (window.gemOptions == null || window.gemOptions == undefined) { 27 window.gemOptions = { 28 first: false, 29 clientWidth: 0, 30 clientHeight: 0, 31 innerWidth: -1 32 }; 33 } 34 35 window.gemOptions.clientWidth = window.innerWidth || document.documentElement.clientWidth; 36 if (document.body != null && !window.gemOptions.clientWidth) { 37 window.gemOptions.clientWidth = document.body.clientWidth; 38 } 39 40 window.gemOptions.clientHeight = window.innerHeight || document.documentElement.clientHeight; 41 if (document.body != null && !window.gemOptions.clientHeight) { 42 window.gemOptions.clientHeight = document.body.clientHeight; 43 } 44 }; 45 46 window.updateGemInnerSize = function(width) { 47 window.gemOptions.innerWidth = width != undefined ? width : (document.body != null ? document.body.clientWidth : 0); 48 }; 49 50 userAgentDetection(); 51 window.updateGemClientSize(true); 52 53 window.gemSettings.lasyDisabled = window.gemSettings.forcedLasyDisabled || (!window.gemSettings.mobileEffectsEnabled && (window.gemSettings.isTouch || window.gemOptions.clientWidth <= 800)); 54})();
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.