1(function() { 2 var extractQueryParamFromURLString, setTrackingParam; 3 4 extractQueryParamFromURLString = function(url, p, maxLength) { 5 var str; 6 if (maxLength == null) { 7 maxLength = 1024; 8 } 9 url = (url.split(p + '=')) || []; 10 str = ((url[1] || '').split('&')[0]); 11 return str.slice(0, maxLength); 12 }; 13 14 setTrackingParam = function(identity, param, expires) { 15 if (!identity.get(Identity.TRACKING_PARAM) || param.indexOf('ref-') === 0 || param.indexOf('schools-') === 0) { 16 return identity.set(Identity.TRACKING_PARAM, param, expires); 17 } 18 }; 19 20 $(function() { 21 var ident, osp_channel, trackingParam; 22 ident = Identity.Singleton(); 23 trackingParam = extractQueryParamFromURLString(window.location.href, Identity.TRACKING_PARAM, 100); 24 if (trackingParam) { 25 setTrackingParam(ident, trackingParam, 540); 26 } 27 osp_channel = extractQueryParamFromURLString(window.location.href, 'osp_channel'); 28 if (osp_channel) { 29 return ident.set('osp_channel', osp_channel); 30 } 31 }); 32 33}).call(this);
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.