Skip to content

Commit f1577e2

Browse files
committed
Small Gift Images + Font Family
1 parent d3b4055 commit f1577e2

File tree

9 files changed

+41
-17
lines changed

9 files changed

+41
-17
lines changed

index.html

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,13 @@ <h2><i class="fa-solid fa-wrench"></i> Setup</h2>
163163
</label>
164164
</div>
165165

166+
<div class="config">
167+
<label>Font Family<br><small>Changes ChatRD's Font</small></label>
168+
<label>
169+
<input type="text" name="chatFontFamily" value="DM Sans">
170+
</label>
171+
</div>
172+
166173
<div class="config">
167174
<label>Background Color<br><small>Changes ChatRD's background color</small></label>
168175
<label>
@@ -471,7 +478,11 @@ <h2><img src="js/modules/tiktok/images/logo-tiktok.svg">TikTok</h2>
471478
<label class="switch"><input type="checkbox" name="showTikTokShares"><span class="slider"></span></label>
472479
</div>
473480
<div class="config">
474-
<label>Gifts</label><label class="switch"><input type="checkbox" name="showTikTokGifts" checked><span class="slider"></span></label>
481+
<label>Gifts<br><small>Shows TikTok Gifts, such as roses, galaxies, etc.</small></label><label class="switch"><input type="checkbox" name="showTikTokGifts" checked><span class="slider"></span></label>
482+
</div>
483+
<div class="config">
484+
<label><i class="fa-solid fa-arrow-turn-up"></i> Small Gift Images<br><small>Shrinks the size of the gift image to 28px.</small></label>
485+
<label class="switch"><input type="checkbox" name="showSmallTikTokGifts"><span class="slider"></span></label>
475486
</div>
476487
<div class="config">
477488
<label>Subscriptions</label><label class="switch"><input type="checkbox" name="showTikTokSubs" checked><span class="slider"></span></label>
@@ -535,6 +546,10 @@ <h2><img src="js/modules/kick/images/logo-kick.svg">Kick</h2>
535546
<label>Kicks Gift<br><small>Shows Kicks Gift events.</small></label>
536547
<label class="switch"><input type="checkbox" name="showKickKicks" checked><span class="slider"></span></label>
537548
</div>
549+
<div class="config">
550+
<label><i class="fa-solid fa-arrow-turn-up"></i> Small Kicks Images<br><small>Shrinks the size of the gift image to 28px.</small></label>
551+
<label class="switch"><input type="checkbox" name="showSmallKicksGifts"><span class="slider"></span></label>
552+
</div>
538553
<div class="config">
539554
<label>Subscriptions<br><small>Shows Subscription events. <u><strong>Disabling this disables all sub events</strong></u>.</small></label>
540555
<label class="switch"><input type="checkbox" name="showKickSubs" checked><span class="slider"></span></label>
@@ -892,6 +907,8 @@ <h3>Add YouTube Member Emote</h3>
892907
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/simple-notify.min.js"></script>
893908
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/purify.min.js"></script>
894909
<script src="https://cdn.jsdelivr.net/npm/@streamerbot/[email protected]/dist/streamerbot-client.min.js"></script>
910+
911+
895912
<script src="js/speakerbot.js"></script>
896913
<script src="js/settings.js"></script>
897914
</body>

js/chatrd.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const chatThreshold = 50;
1414
const chatOneLine = getURLParam("chatOneLine", false);
1515
const chatHorizontal = getURLParam("chatHorizontal", false);
1616
const chatFontSize = getURLParam("chatFontSize", 1);
17+
const chatFontFamily = getURLParam("chatFontFamily", "DM Sans");
1718
const chatBackground = getURLParam("chatBackground", "#121212");
1819
const chatBackgroundOpacity = getURLParam("chatBackgroundOpacity", 1);
1920
const chatScrollBar = getURLParam("chatScrollBar", false);
@@ -32,6 +33,8 @@ const eventTemplate = document.querySelector('#event-message');
3233

3334
const userColors = new Map();
3435

36+
const chatRDBody = document.body;
37+
chatRDBody.style.fontFamily = chatFontFamily;
3538

3639
if (showPlatformStatistics == true) {
3740
var statistics = document.querySelector('#statistics');

js/modules/kick/module.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
filter: drop-shadow(2px 2px 5px rgba(0,0,0,0.5));
4444
}
4545

46+
#chat .event.kick.kicksgifted.small-gift .value span.gift-image img {
47+
width: 28px;
48+
}
49+
4650
#chat .event.kick.kicksgifted .value span.gift-value {
4751
background: rgba(0,0,0,0.2);
4852
padding: 3px 9px;

js/modules/kick/module.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44

55
const showKick = getURLParam("showKick", false);
66

7-
const kickUserName = getURLParam("kickUserName", "vortisrd");
7+
const kickUserName = getURLParam("kickUserName", "");
88

99
const showKickMessages = getURLParam("showKickMessages", true);
1010
const showKickFollows = getURLParam("showKickFollows", true);
1111
const showKickKicks = getURLParam("showKickKicks", true);
12+
const showSmallKicksGifts = getURLParam("showSmallKicksGifts", false);
1213
const showKickSubs = getURLParam("showKickSubs", true);
1314
const showKickGiftedSubs = getURLParam("showKickGiftedSubs", true);
1415
const showKickMassGiftedSubs = getURLParam("showKickMassGiftedSubs", true);
@@ -388,6 +389,8 @@ async function kickKicksGiftedMessage(data) {
388389

389390
const classes = ['kick', 'kicksgifted'];
390391

392+
if (showSmallKicksGifts == true) { classes.push('small-gift'); }
393+
391394
header.remove();
392395

393396
var kicksGiftId = data.gift.gift_id.replace('_', '-');

js/modules/tiktok/module.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@
7575
#chat .item.tiktok span.badge.top-gifter { background: rgba(254, 44, 85, 0.4); }
7676
#chat .item.tiktok span.badge.sceneEight { background: rgba(71, 90, 255, 0.5); }
7777
#chat .item.tiktok span.badge.sceneTen { background: rgba(255, 94, 58, 0.5); }
78+
#chat .item.tiktok.sub span.badge.sceneTen {
79+
outline: 1px solid rgba(255,255,255,1);
80+
outline-offset: -1px;
81+
}
7882

7983
#chat .event.tiktok.gift .value .gift-info {
8084
display: flex;
@@ -93,6 +97,10 @@
9397
filter: drop-shadow(2px 2px 5px rgba(0,0,0,0.5));
9498
}
9599

100+
#chat .event.tiktok.gift.small-gift .value span.gift-image img {
101+
width: 28px;
102+
}
103+
96104
#chat .event.tiktok.gift .value span.gift-value {
97105
background: rgba(0,0,0,0.2);
98106
padding: 3px 9px;

js/modules/tiktok/module.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const showTikTokFollows = getURLParam("showTikTokFollows", true);
1010
const showTikTokLikes = getURLParam("showTikTokLikes", false);
1111
const showTikTokShares = getURLParam("showTikTokShares", false);
1212
const showTikTokGifts = getURLParam("showTikTokGifts", true);
13+
const showSmallTikTokGifts = getURLParam("showSmallTikTokGifts", false);
1314
const showTikTokSubs = getURLParam("showTikTokSubs", true);
1415
const showTikTokStatistics = getURLParam("showTikTokStatistics", true);
1516

@@ -497,6 +498,8 @@ async function tiktokGiftMessage(data) {
497498

498499
const classes = ['tiktok', 'gift'];
499500

501+
if (showSmallTikTokGifts == true) { classes.push('small-gift'); }
502+
500503
header.remove();
501504

502505
let coins = Math.floor(data.repeatCount*data.diamondCount);
@@ -581,7 +584,7 @@ async function getTikTokBadges(data) {
581584
const { isSubscriber, isModerator, userBadges } = data;
582585

583586
let badgesHTML = [
584-
isSubscriber && '<span class="badge sub"><i class="fa-solid fa-star"></i></span>',
587+
//isSubscriber && '<span class="badge sub"><i class="fa-solid fa-star"></i></span>',
585588
isModerator && '<span class="badge mod"><i class="fa-solid fa-user-gear"></i></span>',
586589
];
587590

js/modules/tipeeestream/module.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
/* ----------------------------- */
44

55
const showTipeee = getURLParam("showTipeee", false);
6-
76
const showTipeeeDonations = getURLParam("showTipeeeDonations", true);
87

98
// TIPEEESTREAM EVENTS HANDLERS

js/modules/youtube/module.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
/* ------------------------ */
44

55
const showYoutube = getURLParam("showYoutube", false);
6-
76
const showYouTubeMessages = getURLParam("showYouTubeMessages", true);
87
const showYouTubeSuperChats = getURLParam("showYouTubeSuperChats", true);
98
const showYouTubeSuperStickers = getURLParam("showYouTubeSuperStickers", true);
@@ -18,17 +17,6 @@ let youTubeBTTVEmotes = [];
1817

1918
userColors.set('youtube', new Map());
2019

21-
let youTubeStreamsStatistics = [
22-
{
23-
id : 'auivjbn_34278',
24-
title: 'Live Stream'
25-
},
26-
{
27-
id : 'adikpbjuvbv',
28-
title: 'Live Stream Two'
29-
},
30-
];
31-
3220
// YOUTUBE EVENTS HANDLERS
3321

3422
const youtubeMessageHandlers = {

js/sb.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ let speakerBotClient = null;
66

77
const streamerBotServerAddress = getURLParam("streamerBotServerAddress", "127.0.0.1");
88
const streamerBotServerPort = getURLParam("streamerBotServerPort", "8080");
9-
109
const showSpeakerbot = getURLParam("showSpeakerbot", true);
1110
const speakerBotServerAddress = getURLParam("speakerBotServerAddress", "127.0.0.1");
1211
const speakerBotServerPort = getURLParam("speakerBotServerPort", "7580");

0 commit comments

Comments
 (0)