Apps Home
|
Create an App
Justin location test
Author:
justin_test
Description
Source Code
Launch App
Current Users
Created by:
Justin_Test
function mk_gender_msg(gender) { var GenderMsg = ""; switch (gender) { case 'm': GenderMsg = 'Male user '; break; case 'f': GenderMsg = 'Female user '; break; case 's': GenderMsg = 'Trans user '; break; case 'c': GenderMsg = 'Couple '; break; default: GenderMsg = 'Unkown user '; break; } return GenderMsg; } function get_gender_text_colour(gender) { switch (gender) { case 'f': return "#E74C3C"; case 'c': return "#8E44AD"; case 'm': return "#3498DB"; default: return "#2ECC71"; } } function get_text_weight(solvent) { if (solvent) { return "bold"; } else { return "normal"; } } cb.onEnter(function(user) { var gender = user['gender']; var location = user['location']; var solvent = user['has_tokens']; var GenderMsg = mk_gender_msg(gender); var TextColour = get_gender_text_colour(gender); var TxtWeight = get_text_weight(solvent); cb.chatNotice(GenderMsg+user['user'] + ' entered!', cb.room_slug,' ',TextColour,TxtWeight); }); cb.onLeave(function(user) { var gender = user['gender']; var GenderMsg = mk_gender_msg(gender); var TextColour = get_gender_text_colour(gender); cb.chatNotice(GenderMsg+user['user'] + ' left!', cb.room_slug,' ', TextColour); });
© Copyright Chaturbate 2011- 2024. All Rights Reserved.