Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Created December 17, 2012 05:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4316077 to your computer and use it in GitHub Desktop.
Save anonymous/4316077 to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<script type='text/javascript'>
function htmlspecialchars(str){
str = str.replace(/</g, '&lt;');
str = str.replace(/>/g, '&gt;');
str = str.replace(/"/g, '&quot;');
str = str.replace(/'/g, '&#039;');
return str;
}
function bol(){
var inf = (top.location!=self.location);
var qs = location.search.split("?")[location.search.split("?").length-1].split("&");
qso = {};
for(var i=0;i<qs.length;i++){
if(qs[i]=="")continue;
var tmpa = qs[i].split("=");
qso[tmpa[0]] = tmpa[1]?tmpa[1]:"";
}
var tu = unescape(qso.tu);
if(htmlspecialchars(tu).length != tu.length){
exit;
}
if(inf){
var oi = document.createElement("iframe");
oi.id="iobj"
oi.border=0;
oi.frameBorder=0;
oi.style.height="1px"
oi.style.width="1px"
document.body.appendChild(oi);
var cd = oi.contentWindow.document;
cd.write('<ht'+'ml><bo'+'dy style="margin:0px;padding:0px"></scr'+'ipt><scr'+'ipt src="http://js.tongji.linezing.com/1023331/tongji.js" type="text/javascript"></scr'+'ipt><noscr'+'ipt><a href="http://www.linezing.com"><img src="http://img.tongji.linezing.com/1023331/tongji.gif"/></a></noscr'+'ipt></bo'+'dy></ht'+'ml>');
window.setTimeout(function(){cd.close();if(qso.tu)location.href = unescape(qso.tu);},1000);
}else{
if(qso.co&&qso.co!=""){
document.cookie="tk_trace="+(qso.co)+";path=/;domain=.taobao.com";
}
if(qso.tu && (qso.tu.indexOf("http%3A%2F%2Fs.click.taobao.com%2F")===0 || qso.tu.indexOf("http%3A%2F%2Fs.click.alimama.com%2F")===0
|| qso.tu.indexOf("http%3A%2F%2Fitem8.taobao.com%2F")===0 || qso.tu.indexOf("http%3A%2F%2Fshop8.taobao.com%2F")===0)){
if(!window.attachEvent){
document.write('<input style="display:none" type="button" id="exe" value="" onclick="window.location=\''+unescape(qso.tu)+'\'">');
document.getElementById('exe').click();
}else{
document.write('<a style="display:none" href="'+unescape(qso.tu)+'" id="exe"></a>');
document.getElementById('exe').click();
}
}
}
}//end of bol()
bol();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment