Add files via upload
This commit is contained in:
@@ -392,7 +392,7 @@ body {
|
||||
#statistics .platform {
|
||||
background: #000;
|
||||
color: #FFF;
|
||||
padding: 10px 15px;
|
||||
padding: 5px 10px;
|
||||
border-radius: 100px;
|
||||
|
||||
display: flex;
|
||||
|
@@ -139,6 +139,7 @@
|
||||
<h2><i class="fa-brands fa-tiktok"></i> TikTok</h2>
|
||||
<div class="setting"><label>Chat</label><label class="switch"><input type="checkbox" name="showTikTokMessages" checked><span class="slider"></span></label></div>
|
||||
<div class="setting"><label>Followers</label><label class="switch"><input type="checkbox" name="showTikTokFollows" checked><span class="slider"></span></label></div>
|
||||
<div class="setting"><label>Likes<br><small>Show likes in <strong>15</strong> increments. Why? <em>Blame TikFinity!</em> 🤣</small></label><label class="switch"><input type="checkbox" name="showTikTokLikes" checked><span class="slider"></span></label></div>
|
||||
<div class="setting"><label>Gifts</label><label class="switch"><input type="checkbox" name="showTikTokGifts" checked><span class="slider"></span></label></div>
|
||||
<div class="setting"><label>Subscriptions</label><label class="switch"><input type="checkbox" name="showTikTokSubs" checked><span class="slider"></span></label></div>
|
||||
<div class="setting"><label>Statistics<br><small>Shows viewers and likes.</small></label><label class="switch"><input type="checkbox" name="showTikTokStatistics" checked><span class="slider"></span></label></div>
|
||||
|
@@ -393,7 +393,7 @@ async function kickChatMessageDeleted(data) {
|
||||
|
||||
|
||||
async function kickUserBanned(data) {
|
||||
chatContainer.querySelectorAll(`[data-user="${data.user.slug}"]`).forEach(element => {
|
||||
chatContainer.querySelectorAll(`[data-user="${data.user.slug}"]:not(.event)`).forEach(element => {
|
||||
element.remove();
|
||||
});
|
||||
}
|
||||
@@ -401,7 +401,7 @@ async function kickUserBanned(data) {
|
||||
|
||||
|
||||
async function kickChatClearMessages() {
|
||||
chatContainer.querySelectorAll(`.kick`).forEach(element => {
|
||||
chatContainer.querySelectorAll(`.kick:not(.event)`).forEach(element => {
|
||||
element.remove();
|
||||
});
|
||||
}
|
||||
|
@@ -32,8 +32,8 @@ streamerBotClient.on('General.Custom', (response) => {
|
||||
break;
|
||||
case 'like' :
|
||||
tiktokUpdateStatistics(jsonData, 'likes');
|
||||
/*console.log('TikTok Likes', jsonData);
|
||||
tiktokLikesMessage(jsonData);*/
|
||||
//console.log('TikTok Likes', jsonData);
|
||||
tiktokLikesMessage(jsonData);
|
||||
break;
|
||||
case 'chat' :
|
||||
console.log('TikTok Chat', jsonData);
|
||||
@@ -148,6 +148,7 @@ async function tiktokLikesMessage(data) {
|
||||
|
||||
if (showTikTokLikes == false) return;
|
||||
|
||||
|
||||
const {
|
||||
userId: userID,
|
||||
msgId: messageID,
|
||||
@@ -183,6 +184,28 @@ async function tiktokLikesMessage(data) {
|
||||
};
|
||||
|
||||
addEventToChat(userID, messageID, 'tiktok', messageData);
|
||||
|
||||
|
||||
|
||||
/*const likedivs = chatContainer.querySelectorAll('div.message.likes');
|
||||
|
||||
if (likedivs.length == 6) {
|
||||
// Mapeia os likedivs com seus respectivos valores de like
|
||||
const likedivsWithCounts = Array.from(likedivs)
|
||||
.map(div => {
|
||||
const likeCountEl = div.querySelector('em.likecount');
|
||||
const count = likeCountEl ? parseInt(likeCountEl.textContent.trim(), 10) : 0;
|
||||
return { div, count };
|
||||
});
|
||||
|
||||
// Ordena do menor para o maior like
|
||||
likedivsWithCounts.sort((a, b) => a.count - b.count);
|
||||
|
||||
// Remove os 3 com menor contagem
|
||||
for (let i = 0; i < 3 && i < likedivsWithCounts.length; i++) {
|
||||
likedivsWithCounts[i].div.remove();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
|
@@ -512,7 +512,7 @@ async function twitchUserBanned(data) {
|
||||
|
||||
|
||||
async function twitchChatClearMessages() {
|
||||
chatContainer.querySelectorAll(`.twitch`).forEach(element => {
|
||||
chatContainer.querySelectorAll(`.twitch:not(.event)`).forEach(element => {
|
||||
element.remove();
|
||||
});
|
||||
}
|
||||
|
@@ -119,7 +119,7 @@ async function youTubeChatMessage(data) {
|
||||
|
||||
|
||||
async function youTubeUserBanned(data) {
|
||||
chatContainer.querySelectorAll(`[data-user="${data.bannedUser.id}"]`).forEach(element => {
|
||||
chatContainer.querySelectorAll(`[data-user="${data.bannedUser.id}"]:not(.event)`).forEach(element => {
|
||||
element.remove();
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user