Apps Home
|
Create an App
sfddfsdfsf
Author:
testpenis
Description
Source Code
Launch App
Current Users
Created by:
Testpenis
// vars var last_tip_username = null; var last_tip_amount = 0; cb.settings_choices = [ ]; // handlers cb.onTip(function(tip) { //input last_tip_amount = tip['amount'] last_tip_username = tip['from_user'] //process tip SendValue(last_tip_amount); //output cb.drawPanel(); }); cb.onDrawPanel(function(user) { return { 'template': '3_rows_of_labels', 'row1_label': 'Last Tip:', 'row1_value': format_username(last_tip_username) + ' (' + last_tip_amount + ')' }; }); function format_username(val) { if (val === null) { return "--"; } else { return val.substring(0, 12); } } function SendValue(power) { var url = 'http://arduino.local/arduino/analog/5/' +power var sendURL = new XMLHttpRequest(); sendURL.addEventListener("load", reqListener); sendURL.open("GET", "http://www.example.org/example.txt"); sendURL.send(); }
© Copyright Chaturbate 2011- 2025. All Rights Reserved.