mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-18 19:50:58 -04:00
Added toggles for TikTok
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user