1//---------------------- Variable Definitions -----------------------// 2var url = document.URL; 3var queryParams = []; 4 5// extract params 6var position = url.indexOf('?'); 7 8if (position != -1) { 9 var query_string = url.substring(position + 1, url.length) 10 var pairs = query_string.split('&'); 11 12 for(var i = 0; i < pairs.length; i++) { 13 var vals = pairs[i].split('='); 14 queryParams[vals[0]] = vals[1]; 15 } 16} 17 18var feedId = queryParams['fee'] ? queryParams['fee'] : 0; 19var product = queryParams['fep'] ? queryParams['fep'] : 0; 20var cookieDomain = document.domain; 21 22//---------------------- Cookie Definitions -----------------------// 23var Cookie = { 24 getCookie : function(cookieName) { 25 var dc = document.cookie; 26 var prefix = escape(cookieName) + "="; 27 var begin = dc.indexOf("; " + prefix); 28 if (begin == -1) { 29 begin = dc.indexOf(prefix); 30 if (begin != 0) return null; 31 } else { 32 begin += 2; 33 } 34 var end = document.cookie.indexOf(";", begin); 35 if (end == -1) { 36 end = dc.length; 37 } 38 return unescape(dc.substring(begin + prefix.length, end)); 39 }, 40 41 setCookie : function(cookieName,cookieValue,nDays,path,domain) { 42 var today = new Date(); 43 var expire = new Date(); 44 var string = escape(cookieName) + "=" + escape(cookieValue) 45 if (nDays==null || nDays==0) { 46 // do nothing 47 }else{ 48 expire.setTime(today.getTime() + 3600000*24*nDays); 49 string += ";expires="+expire.toGMTString(); 50 } 51 if (path) { 52 string += ";path="+path; 53 }else{ 54 string += ";path=/"; 55 } 56 if (domain) { 57 document.cookie = string + ";domain="+domain; 58 } 59 } 60}; 61 62//---------------------- End of Cookie Definitions -----------------------// 63 64function feedExportTrackIt () { 65 var currentDate = new Date(); 66 var cookieName = "feedexport"; 67 var session = Cookie.getCookie(cookieName); 68 69 if (!session) { 70 session = '' + Math.floor(currentDate.getTime() / 1000) + Math.floor(Math.random() * 100000000000001); 71 } 72 73 if (session && feedId > 0 && product > 0) { 74 var ndays = 730; 75 var path = '/'; 76 Cookie.setCookie(cookieName, session, ndays, path, cookieDomain); 77 Cookie.setCookie(cookieName + '_fee', feedId, ndays, path, cookieDomain); 78 79 //setup image request 80 var img_src = FEED_BASE_URL + 'feedexportfront/performance/click?rnd=' + Math.floor(Math.random() * 1000000000000001) + "&feed=" + feedId + "&session=" + session + "&product=" + product; 81 console.log(img_src); 82 // load the image 83 var rep_img = new Image(1, 1); 84 rep_img.src = img_src; 85 } 86} 87 88feedExportTrackIt();
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.