1function subscribeEvent(event, listener, useCapture) { 2 if (document.addEventListener) { 3 document.addEventListener(event, listener, useCapture); 4 } else if (document.attachEvent) { 5 document.attachEvent(event, listener, useCapture); 6 } 7} 8 9function unsubscribeEvent(event, listener, useCapture) { 10 if (document.removeEventListener) { 11 document.removeEventListener(event, listener, useCapture); 12 } else if (document.detachEvent) { 13 document.detachEvent(event, listener, useCapture); 14 } 15} 16 17function startActivityHandler(e) { 18 unsubscribeEvent("touchstart", arguments.callee, false); 19 document.documentElement.onmousemove = null; // We need it here to turn off mouse move too. 20 21 if (true) { 22 timeoutSleep(0, placeCssAspxRequest); 23 } 24}; 25 26document.documentElement.onmousemove = startActivityHandler; 27subscribeEvent("touchstart", startActivityHandler, false); 28 29function placeCheckerRequest() { 30 var stt1 = getMetatagContent("VirtualFolder"); 31 var stt2 = "layouts/system/VIChecker.aspx"; 32 var stt3 = addTstampAndSiteToQueryString(getMetatagContent("VIcurrentDateTime")); 33 34 var fileref = document.createElement('link'); 35 fileref.setAttribute('rel', 'stylesheet'); 36 fileref.setAttribute('type', 'text/css'); 37 fileref.setAttribute('href', stt1 + stt2 + stt3); 38 document.getElementsByTagName("head")[0].appendChild(fileref); 39} 40 41function placeCssAspxRequest() { 42 var st1 = getMetatagContent("VirtualFolder"); 43 var st2 = "layouts/system/VisitorIdentificationCSS.aspx"; 44 var st3 = addTstampAndSiteToQueryString(new Date().getTime()); 45 46 var fileref = document.createElement('link'); 47 fileref.setAttribute('rel', 'stylesheet'); 48 fileref.setAttribute('type', 'text/css'); 49 fileref.setAttribute('href', st1 + st2 + st3); 50 document.getElementsByTagName("head")[0].appendChild(fileref); 51 52 timeoutSleep(30000, placeCheckerRequest); 53} 54 55function timeoutSleep(milliseconds, callbackFunction) { 56 window.setTimeout( 57 function() { 58 callbackFunction(); 59 }, 60 milliseconds); 61} 62 63function getMetatagContent(metatagName) { 64 var metas = document.getElementsByTagName('meta'); 65 66 for (var i = 0; i < metas.length; i++) { 67 if (metas[i].getAttribute("name") === metatagName) { 68 return metas[i].getAttribute("content"); 69 } 70 } 71 72 return ""; 73} 74 75function addTstampAndSiteToQueryString(tstamp) { 76 var qsParams = window.location.search; 77 var timestampParam = "tstamp=" + tstamp; 78 var siteNameParam = qsParams.match(/sc_site=.*?&|sc_site=.*$/); 79 80 var queryString = "?" + timestampParam; 81 if (siteNameParam !== null) { 82 queryString = queryString + "&" + siteNameParam; 83 } 84 85 return queryString; 86}
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.