1var isEventSupported = (function(){ 2 var TAGNAMES = { 3 'select':'input','change':'input', 4 'submit':'form','reset':'form', 5 'error':'img','load':'img','abort':'img' 6 } 7 function isEventSupported(eventName) { 8 var el = document.createElement(TAGNAMES[eventName] || 'div'); 9 eventName = 'on' + eventName; 10 var isSupported = (eventName in el); 11 if (!isSupported) { 12 el.setAttribute(eventName, 'return;'); 13 isSupported = typeof el[eventName] == 'function'; 14 } 15 el = null; 16 return isSupported; 17 } 18 return isEventSupported; 19})(); 20 21function isMacOs() { 22 //return navigator && navigator.appVersion && navigator.appVersion.indexOf('Mac') != -1; 23 return false; 24} 25 26function scDetectBrowser() { 27 var ua = navigator.userAgent.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i); 28 if (navigator.userAgent.match(/Edge/i) || navigator.userAgent.match(/Trident.*rv[ :]*11\./i)) { 29 return 'msie'; 30 } 31 else { 32 return ua[1].toLowerCase(); 33 } 34} 35 36var _scOnInputSupport = isEventSupported('input'); 37var _scMacOs = isMacOs(); 38var _scBrowser = scDetectBrowser(); 39 40function scLoadScInput(elemSelector) { 41 if (_scOnInputSupport && !_scMacOs) { 42 $(elemSelector).scInput(); 43 } 44 else { 45 $(elemSelector).listen(); 46 } 47} 48 49var getStringCodePoints = (function() { 50 function surrogatePairToCodePoint(charCode1, charCode2) { 51 return ((charCode1 & 0x3FF) << 10) + (charCode2 & 0x3FF) + 0x10000; 52 } 53 return function(str) { 54 var codePoints = [], i = 0, charCode; 55 while (i < str.length) { 56 charCode = str.charCodeAt(i); 57 if ((charCode & 0xF800) == 0xD800) { 58 codePoints.push(surrogatePairToCodePoint(charCode, str.charCodeAt(++i))); 59 } else { 60 codePoints.push(charCode); 61 } 62 ++i; 63 } 64 return codePoints; 65 } 66})();
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.