Apps Home
|
Create an App
Christmas Tip Tracker
Author:
garterxxx
Description
Source Code
Launch App
Current Users
Created by:
Garterxxx
// ====================================== // 🎄 CHRISTMAS TIP TRACKER // by bad Santa ❄️ // Simple festive tip counter with Top Elf & Latest Gift // ====================================== var totalGifts = 0; var topElf = null; var topGiftAmount = 0; var lastElf = null; var lastGiftAmount = 0; // No settings needed for this simple tracker cb.settings_choices = []; // When someone sends a tip/gift cb.onTip(function(tip) { var amount = parseInt(tip.amount) || 0; var user = tip.from_user || "Secret Santa"; // Update totals totalGifts += amount; lastGiftAmount = amount; lastElf = user; if (amount > topGiftAmount) { topGiftAmount = amount; topElf = user; } // Refresh the panel cb.drawPanel(); }); // Christmas-themed panel (3 rows) cb.onDrawPanel(function(user) { return { 'template': '3_rows_of_labels', 'row1_label': '🎁 Total Gifts:', 'row1_value': totalGifts + ' 🎄', 'row2_label': '🎅 Top Elf:', 'row2_value': formatName(topElf) + ' (' + topGiftAmount + '🎁)', 'row3_label': '❄️ Latest Gift:', 'row3_value': formatName(lastElf) + ' (' + lastGiftAmount + '🎁)' }; }); // Shorten long usernames + safe fallback function formatName(name) { if (!name || name === null) { return "--"; } return name.length > 12 ? name.substring(0, 12) + "…" : name; } // Welcome message when app starts cb.setTimeout(function() { cb.sendNotice( "🎄 Christmas Tip Tracker is now active! ❄️\n" + "Send gifts and watch the snow fall with every tip!", '', '', '#ff0000', 'bold' ); }, 2000);
© Copyright Chaturbate 2011- 2026. All Rights Reserved.