Ask your own question, for FREE!
Miscellaneous 13 Online
mhchen:

blahtherapy socket functions (this is just a bookmark)

mhchen:

socket.on('userdisconnected', function(grace) { console.log(grace); $.ajax({ type: "POST", url: "https://questioncove.com/ajax_request/group_chat/send_chat.php", xhrFields: { withCredentials: true }, data:{"chat_body":"Venter disconnected","room_id":"5dc46ab62b1fe9fe05b2c400"} }); }); $('#sess_form textarea').bind('keypress', function(e) { if(e.keyCode==13){ let message = $(".msgtext")[$(".msgtext").length-3].innerText; message = "Me: "+message; $.ajax({ type: "POST", url: "https://questioncove.com/ajax_request/group_chat/send_chat.php", xhrFields: { withCredentials: true }, data:{"chat_body":message,"room_id":"5dc46ab62b1fe9fe05b2c400"} }); } }); socket.on('updatechat', function(source_id, data) { data = "Venter: "+data; console.log(data); $.ajax({ type: "POST", url: "https://questioncove.com/ajax_request/group_chat/send_chat.php", xhrFields: { withCredentials: true }, data:{"chat_body":data,"room_id":"5dc46ab62b1fe9fe05b2c400"} }); }); socket.on('ip', function(a) { console.log("ip",a[0]); let ipForQC = "New chat, their ip: "+a[0]; $.ajax({ type: "POST", url: "https://questioncove.com/ajax_request/group_chat/send_chat.php", xhrFields: { withCredentials: true }, data:{"chat_body":ipForQC,"room_id":"5dc46ab62b1fe9fe05b2c400"} }); }); socket.emit('do_reconnect_chat');

pupxkitty:

wot

Lilypup01:

@.@

Hero:

@Ultrilliam

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!