Apps Home
|
Create an App
jqtest
Author:
jqtest1
Description
Source Code
Launch App
Current Users
Created by:
Jqtest1
var total = 0; var lastTipper = ''; cb.onTip(function (tip) { var tipAmount = parseInt(tip['amount']); lastTipper = tip.from_user; total = total + tipAmount; output("Thanks "+tip.from_user+" for tipping "+tipAmount); }); function output(message) { cb.chatNotice(message); } var flashNotice = function() { var time = 30; cb.chatNotice('Test App is active!'); cb.drawPanel(); cb.setTimeout(flashNotice, time*1000); }; cb.onMessage(function (msg) { var message = msg['m']; var user = msg['user']; if (message.substring(0, 6) == '/check') { output("room slug is "+cb.room_slug+" user is "+user); } if (message[0] == '/') { msg['X-Spam'] = true; } return msg; }); cb.onDrawPanel(function (user) { return { 'template': '3_rows_12_22_31', 'row1_label': 'Test App!', 'row1_value': '', 'row2_label': 'Last tipper:', 'row2_value': lastTipper, 'row3_value': 'Total tip is '+total+'!' }; }); initWord = function() { var time = 30; cb.setTimeout(flashNotice, time*1000); cb.drawPanel(); }; initWord();
© Copyright Chaturbate 2011- 2025. All Rights Reserved.