You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

47 lines
1.0 KiB

var __isCookie = 0;
(function heartbeat_get()
{
cookie.set("fp",fp);
cookie.set("fp_",fp);
$.post("https://log.yimian.xyz/heartbeat_get.php",{"ip":ip,"fp":fp,"city":ipCity},function(msg){
var obj = eval('(' + msg + ')');
var arr=Object.keys(obj);
var t = Date.parse(new Date())/1000;
if(t > obj.t && t < obj.t + 30) __isCookie = 1;
for(var i = 0; i < arr.length; i++){
cookie.set(arr[i], obj[arr[i]]);
}
});
})();
(function heartbeat_log()
{
setTimeout(function(){
setInterval(function(){
if(__isCookie){
var aCookie = document.cookie.split("; ");
var obj = new Object();
for(var i = 0; i < aCookie.length; i++){
var aCrumb = aCookie[i].split("=");
obj[aCrumb[0]] = aCrumb[1];
}
$.post("https://log.yimian.xyz/heartbeat.php",obj);
cookie.set('fp',fp);
}
},4000);
},3000);
})();