var trace_uid = ''; function getQueryString(queryStringName, url) { var returnValue=""; var URLString= url || new String(document.location); var serachLocation=-1; var queryStringLength=queryStringName.length; do { serachLocation=URLString.indexOf(queryStringName+"\="); if (serachLocation!=-1) { if ((URLString.charAt(serachLocation-1)=='?') || (URLString.charAt(serachLocation-1)=='&')) { URLString=URLString.substr(serachLocation); break; } URLString=URLString.substr(serachLocation+queryStringLength+1); } } while (serachLocation!=-1) if (serachLocation!=-1) { var seperatorLocation = URLString.indexOf("&"); if(seperatorLocation == -1) seperatorLocation = URLString.indexOf("#"); if (seperatorLocation==-1) { returnValue=URLString.substr(queryStringLength+1); } else { returnValue=URLString.substring(queryStringLength+1,seperatorLocation); } } return returnValue; } function isTryNum(uid){ var iuid = parseInt(uid); return uid.length == 9 && iuid > 170000000; return uid.length == 9 && (uid.substr(0, 2) == '18' || uid.substr(0, 2) == '17' ); } /* var huid = getQueryString('uid') || getQueryString('personid') || getQueryString('userid'); if(huid && huid != trace_uid) { if(!trace_uid || (isTryNum(huid) && isTryNum(trace_uid)) || !isTryNum(huid)) { trace_uid = huid; document.write(""); } }*/ var rex = /(\.rar)|(\.zip)|(\.pdf)|(\.block)|(\.dat)|(\.doc)|(\.docx)|(\.xls)|(\.xlsx)|(\.ppt)|(\.pptx)|(\.exe)|(\.apk)$/i; //var comdomain = /(\.)|(.hmj666.com)$/i; function checkAParams(){ var alinks = document.getElementsByTagName('a'); var alen = alinks.length, i = 0; for(i = 0; i < alen; i ++){ var alink = alinks[i]; var href = alink.href; var znzfollow = alink.getAttribute('znzfollow'); if(znzfollow == 'no') { continue } if(!href) continue if(href.substr(0, 5) != 'http:' && href.substr(0, 6) != 'https:') continue try { var urlinfo = href.split('?'); var uriinfo = urlinfo[0]; if(rex.test(uriinfo.toLowerCase())) continue; } catch(e) { } var auid = getQueryString('uid', href) || getQueryString('personid', href) || getQueryString('userid', href); if(!auid){ var parts = href.split('?'); if(parts.length < 2) { var qh = parts[0].split('#'); if(qh.length > 1) { href = qh[0] + "?personid=" + trace_uid + "#" + qh[1]; } else href = href + "?personid=" + trace_uid; } else { var qh = parts[1].split('#'); href = parts[0] + "?" + qh[0] + "&personid=" + trace_uid; if(qh.length > 1) href += "#" + qh[1]; } alink.href = href; } } } if(trace_uid){ if (window.addEventListener) { window.addEventListener('load', checkAParams); } else if (window.attachEvent) { window.attachEvent('onload', checkAParams); } }