Added toggles for TikTok

This commit is contained in:
nuttylmao
2025-07-21 08:34:51 +10:00
parent aa228b608f
commit d3abd7a133
6 changed files with 227 additions and 63 deletions
+18 -2
View File
@@ -87,6 +87,13 @@ const youtubeSuperStickerAction = urlParams.get("youtubeSuperStickerAction") ||
const showYouTubeMemberships = GetBooleanParam("showYouTubeMemberships", true);
const youtubeMembershipAction = urlParams.get("youtubeMembershipAction") || "";
// Which TikTok alerts do you want to see?
const enableTikTokSupport = GetBooleanParam("enableTikTokSupport", false);
const showTikTokGifts = GetBooleanParam("showTikTokGifts", true);
const tiktokGiftAction = urlParams.get("tiktokGiftAction") || "";
const showTikTokSubs = GetBooleanParam("showTikTokSubs", true);
const tiktokSubAction = urlParams.get("tiktokSubAction") || "";
// Which donation alerts do you want to see?
const showStreamlabsDonations = GetBooleanParam("showStreamlabsDonations", false);
const streamlabsDonationAction = urlParams.get("streamlabsDonationAction") || "";
@@ -389,6 +396,9 @@ window.addEventListener('load', KickConnect);
let tikfinityWebsocket = null;
function TikfinityConnect() {
if (!enableTikTokSupport)
return;
if (tikfinityWebsocket) return; // Already connected
tikfinityWebsocket = new WebSocket("ws://localhost:21213/");
@@ -1367,6 +1377,9 @@ async function KickStreamHost(data) {
}
async function TikTokGift(data) {
if (!showTikTokGifts)
return;
// Set the text
const username = data.nickname;
const tiktokIcon = `<img src="icons/platforms/tiktok.png" class="platform"/>`;
@@ -1383,12 +1396,15 @@ async function TikTokGift(data) {
'',
username,
'',
'', //twitchSubAction,
tiktokGiftAction,
data
);
}
async function TikTokSubscribe(data) {
if (!showTikTokSubs)
return;
// Set the text
const username = data.nickname;
const tiktokIcon = `<img src="icons/platforms/tiktok.png" class="platform"/>`;
@@ -1404,7 +1420,7 @@ async function TikTokSubscribe(data) {
'',
username,
'',
'', //twitchSubAction,
tiktokSubAction,
data
);
}
+73 -29
View File
@@ -312,6 +312,57 @@
"showIf": "showTwitchRaids",
"group": "Which Twitch alerts do you want to see?"
},
{
"id": "showYouTubeSuperChats",
"label": "Super Chats",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Which YouTube alerts do you want to see?"
},
{
"id": "youtubeSuperChatAction",
"label": "",
"description": "Also run this Streamer.bot Action",
"type": "sb-actions",
"defaultValue": "",
"showIf": "showYouTubeSuperChats",
"group": "Which YouTube alerts do you want to see?"
},
{
"id": "showYouTubeSuperStickers",
"label": "Super Stickers",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Which YouTube alerts do you want to see?"
},
{
"id": "youtubeSuperStickerAction",
"label": "",
"description": "Also run this Streamer.bot Action",
"type": "sb-actions",
"defaultValue": "",
"showIf": "showYouTubeSuperStickers",
"group": "Which YouTube alerts do you want to see?"
},
{
"id": "showYouTubeMemberships",
"label": "Memberships",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Which YouTube alerts do you want to see?"
},
{
"id": "youtubeMembershipAction",
"label": "",
"description": "Also run this Streamer.bot Action",
"type": "sb-actions",
"defaultValue": "",
"showIf": "showYouTubeMemberships",
"group": "Which YouTube alerts do you want to see?"
},
{
"id": "enableKickSupport",
"label": "Enable Kick Support",
@@ -384,55 +435,48 @@
"group": "Which Kick alerts do you want to see?"
},
{
"id": "showYouTubeSuperChats",
"label": "Super Chats",
"id": "enableTikTokSupport",
"label": "Enable TikTok Support",
"description": "",
"type": "checkbox",
"defaultValue": false,
"group": "Which TikTok alerts do you want to see?"
},
{
"id": "showTikTokGifts",
"label": "Gifts",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Which YouTube alerts do you want to see?"
"showIf": "enableTikTokSupport",
"group": "Which TikTok alerts do you want to see?"
},
{
"id": "youtubeSuperChatAction",
"id": "tiktokGiftAction",
"label": "",
"description": "Also run this Streamer.bot Action",
"type": "sb-actions",
"defaultValue": "",
"showIf": "showYouTubeSuperChats",
"group": "Which YouTube alerts do you want to see?"
"showIf": "showTikTokGifts",
"group": "Which TikTok alerts do you want to see?"
},
{
"id": "showYouTubeSuperStickers",
"label": "Super Stickers",
"id": "showTikTokSubs",
"label": "New Subscribers",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Which YouTube alerts do you want to see?"
"showIf": "enableTikTokSupport",
"group": "Which TikTok alerts do you want to see?"
},
{
"id": "youtubeSuperStickerAction",
"id": "tiktokSubAction",
"label": "",
"description": "Also run this Streamer.bot Action",
"type": "sb-actions",
"defaultValue": "",
"showIf": "showYouTubeSuperStickers",
"group": "Which YouTube alerts do you want to see?"
},
{
"id": "showYouTubeMemberships",
"label": "Memberships",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Which YouTube alerts do you want to see?"
},
{
"id": "youtubeMembershipAction",
"label": "",
"description": "Also run this Streamer.bot Action",
"type": "sb-actions",
"defaultValue": "",
"showIf": "showYouTubeMemberships",
"group": "Which YouTube alerts do you want to see?"
"showIf": "showTikTokSubs",
"group": "Which TikTok alerts do you want to see?"
},
{
"id": "showStreamlabsDonations",