mirror of
https://github.com/chatopera/cosin.git
synced 2025-07-16 00:22:22 +08:00
#301 add rnd in Fingerprint
This commit is contained in:
parent
722a6d8842
commit
355081226e
@ -451,7 +451,23 @@ function openAgentChatDialog(url){
|
||||
}
|
||||
|
||||
<#if webimexist == true >
|
||||
Fingerprint2.get({extraComponents: [<#if channelVisitorSeparate?? && channelVisitorSeparate == true>{key: "cskefuAppId", getData: function(done, options){done("${appid!''}")}}</#if>]}, function(components){
|
||||
Fingerprint2.get({extraComponents: [<#if channelVisitorSeparate?? && channelVisitorSeparate == true>{key: "cskefuAppId", getData: function(done, options){done("${appid!''}")}},</#if>
|
||||
{
|
||||
key: "rndId",
|
||||
getData(done, options){
|
||||
var rnd = '';
|
||||
if(localStorage){
|
||||
rnd = localStorage.finger;
|
||||
if(!rnd){
|
||||
rnd = Math.random();
|
||||
localStorage.finger = rnd;
|
||||
}
|
||||
}
|
||||
|
||||
done(rnd);
|
||||
}
|
||||
}
|
||||
]}, function(components){
|
||||
var glue = components.map(function (component) { return component.value })
|
||||
cskefuOnlineUserId = Fingerprint2.x64hash128(glue.join(''), 31);
|
||||
cskefu.ajax(cskefu.in+"&userid="+cskefuOnlineUserId+"&t="+new Date().getTime() , function(data){
|
||||
|
@ -33,7 +33,23 @@ var ukefu = {
|
||||
window.location.replace(url+"&t="+new Date().getTime());
|
||||
}
|
||||
}
|
||||
Fingerprint2.get({extraComponents: [<#if channelVisitorSeparate?? && channelVisitorSeparate == true>{key: "cskefuAppId", getData: function(done, options){done("${appid!''}")}}</#if>]}, function(components){
|
||||
Fingerprint2.get({extraComponents: [<#if channelVisitorSeparate?? && channelVisitorSeparate == true>{key: "cskefuAppId", getData: function(done, options){done("${appid!''}")}},</#if>
|
||||
{
|
||||
key: "rndId",
|
||||
getData(done, options){
|
||||
var rnd = '';
|
||||
if(localStorage){
|
||||
rnd = localStorage.finger;
|
||||
if(!rnd){
|
||||
rnd = Math.random();
|
||||
localStorage.finger = rnd;
|
||||
}
|
||||
}
|
||||
|
||||
done(rnd);
|
||||
}
|
||||
}
|
||||
]}, function(components){
|
||||
var glue = components.map(function (component) { return component.value })
|
||||
cskefuOnlineUserId = Fingerprint2.x64hash128(glue.join(''), 31)
|
||||
ukefu.chat = ukefu.chat + "<#if userid??>&userid=${userid}<#else>&userid="+cskefuOnlineUserId+"</#if>&sessionid=${sessionid!''}<#if ai??>&ai=${ai}</#if><#if title??>&title=${title?url}</#if><#if traceid??>&url=${url?url}</#if><#if traceid??>&traceid=${traceid}</#if>";
|
||||
|
Loading…
x
Reference in New Issue
Block a user