Apps Home
|
Create an App
mygendernotifier
Author:
glancor
Description
Source Code
Launch App
Current Users
Created by:
Glancor
// by Exhib17cm var wc_count = 0; var wc_total = 0; var wc_total_other = 0; var wc_names=new Array() var wc_names_other=new Array() cb.settings_choices = []; cb.onMessage(function (msg) { if (msg['gender'] == 'f' || msg['gender'] == 'c') { cb.sendNotice(msg['user'] + ' is '+msg['gender']+'!', cb.room_slug, '#9F9'); } else if(msg['gender'] == 'm') { cb.sendNotice(msg['user'] + ' is '+msg['gender']+'!', cb.room_slug); } return msg; }); cb.onEnter(function(user) { if (user['gender'] == 'f' || user['gender'] == 'c') { wc_count++ if(wc_names.indexOf(user['user']) == -1) { wc_total++ wc_names.push(user['user'],Date.now()) } cb.sendNotice(wc_count+'. '+user['gender']+' '+user['user'] + ' entered!', cb.room_slug, '#F99'); } else if(user['gender'] == 'm') { wc_count++ if(wc_names.indexOf(user['user']) == -1) { wc_total++ wc_names.push(user['user'],Date.now()) } cb.sendNotice(wc_count+'. '+user['gender']+' '+user['user'] + ' entered!', cb.room_slug); } else if(wc_names_other.indexOf(user['user']) == -1) { wc_total_other++ wc_names_other.push(user['user'],Date.now()) } }); cb.onLeave(function(user) { if (user['gender'] == 'f' || user['gender'] == 'c' || user['gender'] == 'm') { if (user['gender'] == 'f' || user['gender'] == 'c') { cb.sendNotice(wc_count+'. '+user['gender']+' '+user['user'] + ' left!', cb.room_slug, "#C287C2"); } else if (user['gender'] == 'm') { cb.sendNotice(wc_count+'. '+user['gender']+' '+user['user'] + ' left!', cb.room_slug); } var index = -1; for ( var i = 0; i < wc_names.length; i++ ) { if (wc_names[i][0] === user['user'] ) { index = i; } } if(index>-1){ cb.sendNotice(user['user'] + ' stayed ' + (Date.now()-wc_names[index][1] , cb.room_slug)/1000 + 's'); } wc_count-- } }); function update_subject() { if(!(typeof cb === "undefined")) cb.changeRoomSubject('#straight #onlygirls') } function init() { update_subject(); let wc_test = [ ['user1',Date.now() + 0], ['user2', Date.now() + 1], ['user3', Date.now() + 2], ['user4', Date.now() + 3], ['user5', Date.now() + 4] ]; wc_test.push( ['user6', Date.now() + 6] ); var index = -1; for ( var i = 0; i < wc_test.length; i++ ) { if ( wc_test[i][0] === 'user6') { index = i; } } cb.sendNotice(Date.now()-wc_test[index][1] , cb.room_slug); } init(); function generate_link_page(old) { // <script>var cb</script> var as=prompt().split(' ').sort() var asOld=old.split(' ') document.write('<table width="100%"><tr><td align="right"><div align="left" style="display:inline-block">') for (var i = 0; i < as.length; i++) { if(asOld.indexOf(as[i]) == -1) document.write('<a href="http://chaturbate.com/'+as[i]+'/" target="Data">'+as[i]+'</a><br>') } document.write('</div></table>') }
© Copyright Chaturbate 2011- 2024. All Rights Reserved.