first commit

This commit is contained in:
2024-11-10 21:08:49 +01:00
commit 0d932ce5ee
14455 changed files with 2567501 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
jQuery(window).ready(function(){
jQuery('#connect-ztb, [zb-plugin="zb_fbc"]').click(function(){
setTimeout(function(){
checkToken();
},3000);
});
function checkToken(){
jQuery.ajax({
type: "POST",
url: ZTB_BASE_URL+'/customer/access/checkAuth?callback=?',
data: {type:'check auth'},
xhrFields: {
withCredentials: true
},
dataType: "jsonp",
success: function(response){
if(response.auth == true){
jQuery.ajax({
type: "POST",
url: ZBT_WP_ADMIN_URL+'admin-ajax.php?action=update_zb_fbc_code',
data: {
domain:response.domain,
access:response.access,
customer:response.customer,
email:response.email,
token:response.token,
},
success: function(response){
location.reload();
}
});
}else{
setTimeout(function(){
checkToken();
},3000);
}
}
});
}
});