1var execTime = new Date(); 2var loadABtest = true; 3var ua = (function() { 4 return { 5 isFirefox: 'MozAppearance' in document.documentElement.style, 6 isChrome: navigator.userAgent.toLowerCase().search(/chrome/) != -1, 7 isSafari: !window.chrome && 'WebkitAppearance' in document.documentElement.style, 8 isAndroid: navigator.userAgent.toLowerCase().search(/android/) != -1 9 }; 10})(); 11 12function saveBlockClickLog(blockId) { 13 var now = new Date(); 14 if (now.getTime() - execTime.getTime() > 500) { 15 execTime = now; 16 if (ua.isChrome || ua.isFirefox || ua.isSafari || ua.isAndroid) { 17 jQuery.ajax({ 18 url: "abtest/blockclick.aspx", 19 async: false, 20 timeout: 1000, 21 cache: false, 22 type: "post", 23 data: { 24 blockId: blockId 25 } 26 }); 27 } else { 28 jQuery.ajax({ 29 url: "abtest/blockclick.aspx", 30 cache: false, 31 type: "post", 32 data: { 33 blockId: blockId 34 } 35 }); 36 } 37 } 38} 39jQuery(document).ready(function() { 40 if ("blockIdList" in window) { 41 var blockIds = blockIdList.split(","); 42 jQuery.each(blockIds, function(index, blockId) { 43 var blockName = "#block_of_" + blockId; 44 jQuery(blockName).delegate("a:not(.item_history_link_,.logout_link_)", "click", { 45 blockId: blockId 46 }, function(event) { 47 saveBlockClickLog(event.data.blockId); 48 }); 49 jQuery(blockName).delegate("form", "submit", { 50 blockId: blockId 51 }, function(event) { 52 saveBlockClickLog(event.data.blockId); 53 }); 54 jQuery(blockName).delegate("input[type=button]", "click", { 55 blockId: blockId 56 }, function(event) { 57 saveBlockClickLog(event.data.blockId); 58 }); 59 }); 60 } 61});
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.