Develop and test your CB apps & bots in a page that simulate the Chaturbate environment.
- Check the Apps & Bots Programming Documentation.
- Based on the idea from CB-AppDevKit.
Access the live version and start testing your app without the need to setup a server.
Running multiple apps/bots at the same time is not realiable.
When running locally, develop your apps & bots under the app directory:
cb/CBApp.js
is the app file;cb/CBBot#.js
are the bots files (# is number of the bot).
To enable or disable debug mode, type /debug into chat.
If you need to insert breakpoint in your code, user the debugger;
statement
and keep your Developer Tools console open.
Put your custom emoticons under the cb/emoticons directory.
The standard emoticons are available:
cool.jpg
->:cool
lmao.jpg
->:lmao
- ...
If you want to add or remove users (onEnter/onLeave events) use your Developer Tools console to access the Room
object:
Room.addUser(user)
, whereuser
is an object:- user : username of the user
- gender : "m" (male), "f" (female), "s" (trans), or "c" (couple)
- in_fanclub : is the user in the broadcasters fan club [default: false]
- has_tokens : does the user have at least 1 token [default: false]
- is_mod : is the user a moderator [default: false]
- tipped_recently : is the user a "dark blue" [default: false]
- tipped_alot_recently: is the user a "purple" [default: false]
- tipped_tons_recently: is the user a "dark purple" [default: false]
Room.removeUser(username)
, whereusername
is a string with username of the user.
When running locally, if you need to reload your app code, it is reloaded when you deactivate it. No need to reload the page.
If you want to run locally, download the latest release.
Run the file bin/run.sh
or go to the project directory and run python -m SimpleHTTPServer 8000
on terminal.
Now you can access localhost:8000 on your browser and test your app.
Or setup your server and put the CB-TestBed files on it.
Run the file bin/build.sh
or go to the project directory and run cat src/*.coffee | coffee --bare --compile --no-header --stdio > script.js
on terminal.
Now run the CB-TestBed and test your app.
If you are having problems, open a new issue or e-mail yyan.nx@gmail.com.
Released under The MIT License (MIT).
All files under the cb directory and the index.html file (some of them with modifications) are copyrighted to Chaturbate.com.