diff --git a/horizontal-chat/script.js b/horizontal-chat/script.js index a7691fd..854fc8c 100644 --- a/horizontal-chat/script.js +++ b/horizontal-chat/script.js @@ -64,6 +64,11 @@ const showYouTubeSuperChats = GetBooleanParam("showYouTubeSuperChats", true); const showYouTubeSuperStickers = GetBooleanParam("showYouTubeSuperStickers", true); const showYouTubeMemberships = GetBooleanParam("showYouTubeMemberships", true); +const enableTikTokSupport = GetBooleanParam("enableTikTokSupport", false); +const showTikTokMessages = GetBooleanParam("showTikTokMessages", false); +const showTikTokGifts = GetBooleanParam("showTikTokGifts", false); +const showTikTokSubs = GetBooleanParam("showTikTokSubs", false); + const showStreamlabsDonations = GetBooleanParam("showStreamlabsDonations", true) const showStreamElementsTips = GetBooleanParam("showStreamElementsTips", true); const showPatreonMemberships = GetBooleanParam("showPatreonMemberships", true); @@ -379,6 +384,9 @@ window.addEventListener('load', KickConnect); let tikfinityWebsocket = null; function TikfinityConnect() { + if (!enableTikTokSupport) + return; + if (tikfinityWebsocket) return; // Already connected tikfinityWebsocket = new WebSocket("ws://localhost:21213/"); @@ -1400,6 +1408,9 @@ function KickUserBanned(data) { } async function TikTokChat(data) { + if (!showTikTokMessages) + return; + // Don't post messages starting with "!" if (data.comment.startsWith("!") && excludeCommands) return; @@ -1498,6 +1509,9 @@ async function TikTokChat(data) { } async function TikTokGift(data) { + if (!showTikTokGifts) + return; + if (data.giftType === 1 && !data.repeatEnd) { // Streak in progress => show only temporary console.debug(`${data.uniqueId} is sending gift ${data.giftName} x${data.repeatCount}`); @@ -1515,6 +1529,9 @@ async function TikTokGift(data) { } async function TikTokSubscribe(data) { + if (!showTikTokSubs) + return; + let username = data.nickname; const message = `${username} subscribed on TikTok`; diff --git a/horizontal-chat/settings/settings.json b/horizontal-chat/settings/settings.json index 130c2f6..813ae48 100644 --- a/horizontal-chat/settings/settings.json +++ b/horizontal-chat/settings/settings.json @@ -175,6 +175,38 @@ "defaultValue": true, "group": "Which Twitch messages do you want to see?" }, + { + "id": "showYouTubeMessages", + "label": "Chat Messages", + "description": "", + "type": "checkbox", + "defaultValue": true, + "group": "Which YouTube messages do you want to see?" + }, + { + "id": "showYouTubeSuperChats", + "label": "Super Chats", + "description": "", + "type": "checkbox", + "defaultValue": true, + "group": "Which YouTube messages do you want to see?" + }, + { + "id": "showYouTubeSuperStickers", + "label": "Super Stickers", + "description": "", + "type": "checkbox", + "defaultValue": true, + "group": "Which YouTube messages do you want to see?" + }, + { + "id": "showYouTubeMemberships", + "label": "Memberships", + "description": "", + "type": "checkbox", + "defaultValue": true, + "group": "Which YouTube messages do you want to see?" + }, { "id": "enableKickSupport", "label": "Enable Kick Support", @@ -229,36 +261,39 @@ "group": "Which Kick messages do you want to see?" }, { - "id": "showYouTubeMessages", + "id": "enableTikTokSupport", + "label": "Enable TikTok Support", + "description": "", + "type": "checkbox", + "defaultValue": false, + "group": "Which TikTok messages do you want to see?" + }, + { + "id": "showTikTokMessages", "label": "Chat Messages", "description": "", "type": "checkbox", "defaultValue": true, - "group": "Which YouTube messages do you want to see?" + "showIf": "enableTikTokSupport", + "group": "Which TikTok messages do you want to see?" }, { - "id": "showYouTubeSuperChats", - "label": "Super Chats", + "id": "showTikTokGifts", + "label": "Gifts", "description": "", "type": "checkbox", "defaultValue": true, - "group": "Which YouTube messages do you want to see?" + "showIf": "enableTikTokSupport", + "group": "Which TikTok messages do you want to see?" }, { - "id": "showYouTubeSuperStickers", - "label": "Super Stickers", + "id": "showTikTokSubs", + "label": "New Subscribers", "description": "", "type": "checkbox", "defaultValue": true, - "group": "Which YouTube messages do you want to see?" - }, - { - "id": "showYouTubeMemberships", - "label": "Memberships", - "description": "", - "type": "checkbox", - "defaultValue": true, - "group": "Which YouTube messages do you want to see?" + "showIf": "enableTikTokSupport", + "group": "Which TikTok messages do you want to see?" }, { "id": "showStreamlabsDonations", diff --git a/multichat-overlay/script.js b/multichat-overlay/script.js index 218e8d9..54cec04 100644 --- a/multichat-overlay/script.js +++ b/multichat-overlay/script.js @@ -68,6 +68,11 @@ const showYouTubeSuperChats = GetBooleanParam("showYouTubeSuperChats", true); const showYouTubeSuperStickers = GetBooleanParam("showYouTubeSuperStickers", true); const showYouTubeMemberships = GetBooleanParam("showYouTubeMemberships", true); +const enableTikTokSupport = GetBooleanParam("enableTikTokSupport", false); +const showTikTokMessages = GetBooleanParam("showTikTokMessages", false); +const showTikTokGifts = GetBooleanParam("showTikTokGifts", false); +const showTikTokSubs = GetBooleanParam("showTikTokSubs", false); + const showStreamlabsDonations = GetBooleanParam("showStreamlabsDonations", true) const showStreamElementsTips = GetBooleanParam("showStreamElementsTips", true); const showPatreonMemberships = GetBooleanParam("showPatreonMemberships", true); @@ -402,6 +407,9 @@ window.addEventListener('load', KickConnect); let tikfinityWebsocket = null; function TikfinityConnect() { + if (!enableTikTokSupport) + return; + if (tikfinityWebsocket) return; // Already connected tikfinityWebsocket = new WebSocket("ws://localhost:21213/"); @@ -2497,6 +2505,9 @@ function KickUserBanned(data) { async function TikTokChat(data) { + if (!showTikTokMessages) + return; + // Don't post messages starting with "!" if (data.comment.startsWith("!") && excludeCommands) return; @@ -2631,6 +2642,9 @@ async function TikTokChat(data) { } function TikTokGift(data) { + if (!showTikTokGifts) + return; + if (data.giftType === 1 && !data.repeatEnd) { // Streak in progress => show only temporary console.debug(`${data.uniqueId} is sending gift ${data.giftName} x${data.repeatCount}`); @@ -2663,6 +2677,9 @@ function TikTokGift(data) { } function TikTokSubscribe(data) { + if (!showTikTokSubs) + return; + // Get a reference to the template const template = document.getElementById('cardTemplate'); diff --git a/multichat-overlay/settings/settings.json b/multichat-overlay/settings/settings.json index 57478ec..b144980 100644 --- a/multichat-overlay/settings/settings.json +++ b/multichat-overlay/settings/settings.json @@ -304,6 +304,38 @@ "defaultValue": 2, "group": "Which Twitch messages do you want to see?" }, + { + "id": "showYouTubeMessages", + "label": "Chat Messages", + "description": "", + "type": "checkbox", + "defaultValue": true, + "group": "Which YouTube messages do you want to see?" + }, + { + "id": "showYouTubeSuperChats", + "label": "Super Chats", + "description": "", + "type": "checkbox", + "defaultValue": true, + "group": "Which YouTube messages do you want to see?" + }, + { + "id": "showYouTubeSuperStickers", + "label": "Super Stickers", + "description": "", + "type": "checkbox", + "defaultValue": true, + "group": "Which YouTube messages do you want to see?" + }, + { + "id": "showYouTubeMemberships", + "label": "Memberships", + "description": "", + "type": "checkbox", + "defaultValue": true, + "group": "Which YouTube messages do you want to see?" + }, { "id": "enableKickSupport", "label": "Enable Kick Support", @@ -358,36 +390,39 @@ "group": "Which Kick messages do you want to see?" }, { - "id": "showYouTubeMessages", + "id": "enableTikTokSupport", + "label": "Enable TikTok Support", + "description": "", + "type": "checkbox", + "defaultValue": false, + "group": "Which TikTok messages do you want to see?" + }, + { + "id": "showTikTokMessages", "label": "Chat Messages", "description": "", "type": "checkbox", "defaultValue": true, - "group": "Which YouTube messages do you want to see?" + "showIf": "enableTikTokSupport", + "group": "Which TikTok messages do you want to see?" }, { - "id": "showYouTubeSuperChats", - "label": "Super Chats", + "id": "showTikTokGifts", + "label": "Gifts", "description": "", "type": "checkbox", "defaultValue": true, - "group": "Which YouTube messages do you want to see?" + "showIf": "enableTikTokSupport", + "group": "Which TikTok messages do you want to see?" }, { - "id": "showYouTubeSuperStickers", - "label": "Super Stickers", + "id": "showTikTokSubs", + "label": "New Subscribers", "description": "", "type": "checkbox", "defaultValue": true, - "group": "Which YouTube messages do you want to see?" - }, - { - "id": "showYouTubeMemberships", - "label": "Memberships", - "description": "", - "type": "checkbox", - "defaultValue": true, - "group": "Which YouTube messages do you want to see?" + "showIf": "enableTikTokSupport", + "group": "Which TikTok messages do you want to see?" }, { "id": "showStreamlabsDonations", diff --git a/multistream-alerts/script.js b/multistream-alerts/script.js index 0087703..d8117c1 100644 --- a/multistream-alerts/script.js +++ b/multistream-alerts/script.js @@ -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 = ``; @@ -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 = ``; @@ -1404,7 +1420,7 @@ async function TikTokSubscribe(data) { '', username, '', - '', //twitchSubAction, + tiktokSubAction, data ); } diff --git a/multistream-alerts/settings/settings.json b/multistream-alerts/settings/settings.json index b239e08..bbf9af4 100644 --- a/multistream-alerts/settings/settings.json +++ b/multistream-alerts/settings/settings.json @@ -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",