Skip to content

Commit fe3e8ab

Browse files
committed
For Streamer.bot 1.0.5 Beta 6
1 parent c8d6f33 commit fe3e8ab

4 files changed

Lines changed: 88 additions & 40 deletions

File tree

beta/chat.html

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/simple-notify.min.css">
1414
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/animate.min.css">
1515

16-
<link rel="stylesheet" href="css/chatrd.css?nocache=27">
16+
<link rel="stylesheet" href="css/chatrd.css?nocache=28">
1717
<link id="chatrd-skins" rel="stylesheet" href="css/skin-default.css">
1818

1919
<meta name="robots" content="noindex, nofollow">
@@ -43,6 +43,9 @@
4343
<div id="chat-autocomplete-list"></div>
4444

4545
<form>
46+
<div id="commands-button">
47+
<button>/</button>
48+
</div>
4649
<div id="chat-input-text-field-container">
4750
<input id="chat-input-text-field" type="text" autocomplete="off" placeholder="Type a message...">
4851
</div>
@@ -173,47 +176,47 @@
173176
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/web/pusher.min.js"></script>
174177
<script src="https://unpkg.com/@streamerbot/client/dist/streamerbot-client.js"></script>
175178

176-
<script src="js/i18n-chatrd.js?nocache=27"></script>
179+
<script src="js/i18n-chatrd.js?nocache=28"></script>
177180

178-
<script src="js/speakerbot.js?nocache=27"></script>
179-
<script src="js/sb.js?nocache=27"></script>
180-
<script src="js/queue.js?nocache=27"></script>
181+
<script src="js/speakerbot.js?nocache=28"></script>
182+
<script src="js/sb.js?nocache=28"></script>
183+
<script src="js/queue.js?nocache=28"></script>
181184

182-
<script src="js/chatrd.js?nocache=27"></script>
185+
<script src="js/chatrd.js?nocache=28"></script>
183186

184-
<script src="js/modules/twitch/addon-seventv-paint.js?nocache=27"></script>
185-
<script src="js/modules/twitch/addon-message-effects-canvas.js?nocache=27"></script>
186-
<script src="js/modules/twitch/addon-on-screen-celebration.js?nocache=27"></script>
187+
<script src="js/modules/twitch/addon-seventv-paint.js?nocache=28"></script>
188+
<script src="js/modules/twitch/addon-message-effects-canvas.js?nocache=28"></script>
189+
<script src="js/modules/twitch/addon-on-screen-celebration.js?nocache=28"></script>
187190

188-
<link href="js/modules/twitch/module.css?nocache=27" rel="stylesheet">
189-
<script src="js/modules/twitch/module.js?nocache=27"></script>
191+
<link href="js/modules/twitch/module.css?nocache=28" rel="stylesheet">
192+
<script src="js/modules/twitch/module.js?nocache=28"></script>
190193

191-
<link href="js/modules/youtube/module.css?nocache=27" rel="stylesheet">
192-
<script src="js/modules/youtube/module.js?nocache=27"></script>
194+
<link href="js/modules/youtube/module.css?nocache=28" rel="stylesheet">
195+
<script src="js/modules/youtube/module.js?nocache=28"></script>
193196

194-
<link href="js/modules/tiktok/module.css?nocache=27" rel="stylesheet">
195-
<script src="js/modules/tiktok/module.js?nocache=27"></script>
197+
<link href="js/modules/tiktok/module.css?nocache=28" rel="stylesheet">
198+
<script src="js/modules/tiktok/module.js?nocache=28"></script>
196199

197-
<link href="js/modules/kick/module.css?nocache=27" rel="stylesheet">
198-
<script src="js/modules/kick/module.js?nocache=27"></script>
200+
<link href="js/modules/kick/module.css?nocache=28" rel="stylesheet">
201+
<script src="js/modules/kick/module.js?nocache=28"></script>
199202

200-
<link href="js/modules/streamelements/module.css?nocache=27" rel="stylesheet">
201-
<script src="js/modules/streamelements/module.js?nocache=27"></script>
203+
<link href="js/modules/streamelements/module.css?nocache=28" rel="stylesheet">
204+
<script src="js/modules/streamelements/module.js?nocache=28"></script>
202205

203-
<link href="js/modules/streamlabs/module.css?nocache=27" rel="stylesheet">
204-
<script src="js/modules/streamlabs/module.js?nocache=27"></script>
206+
<link href="js/modules/streamlabs/module.css?nocache=28" rel="stylesheet">
207+
<script src="js/modules/streamlabs/module.js?nocache=28"></script>
205208

206-
<link href="js/modules/patreon/module.css?nocache=27" rel="stylesheet">
207-
<script src="js/modules/patreon/module.js?nocache=27"></script>
209+
<link href="js/modules/patreon/module.css?nocache=28" rel="stylesheet">
210+
<script src="js/modules/patreon/module.js?nocache=28"></script>
208211

209-
<link href="js/modules/tipeeestream/module.css?nocache=27" rel="stylesheet">
210-
<script src="js/modules/tipeeestream/module.js?nocache=27"></script>
212+
<link href="js/modules/tipeeestream/module.css?nocache=28" rel="stylesheet">
213+
<script src="js/modules/tipeeestream/module.js?nocache=28"></script>
211214

212-
<link href="js/modules/kofi/module.css?nocache=27" rel="stylesheet">
213-
<script src="js/modules/kofi/module.js?nocache=27"></script>
215+
<link href="js/modules/kofi/module.css?nocache=28" rel="stylesheet">
216+
<script src="js/modules/kofi/module.js?nocache=28"></script>
214217

215-
<link href="js/modules/fourthwall/module.css?nocache=27" rel="stylesheet">
216-
<script src="js/modules/fourthwall/module.js?nocache=27"></script>
218+
<link href="js/modules/fourthwall/module.css?nocache=28" rel="stylesheet">
219+
<script src="js/modules/fourthwall/module.js?nocache=28"></script>
217220

218221
<script src="js/testmode.js"></script>
219222

beta/css/chatrd.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,16 @@ body {
230230
width: 100%;
231231
}
232232

233+
#chat-input #commands-button button {
234+
display: inline-flex;
235+
height: 40px;
236+
align-items: center;
237+
justify-content: center;
238+
padding: 10px 15px;
239+
background: rgba(255,255,255,0.1);
240+
border-radius: 5px 0 0 5px;
241+
}
242+
233243
#chat-input #chat-input-platorms-buttons {
234244
display: flex;
235245
flex-direction: row;
@@ -294,7 +304,6 @@ body {
294304
background: rgba(0,0,0,0.4);
295305
color: #efeff1;
296306
padding: 10px 15px 10px 15px;
297-
border-radius: 5px 0 0 5px;
298307
outline: none;
299308
font-size: 16px;
300309
width: 100%;

beta/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1876,9 +1876,9 @@ <h3><span data-i18n="modal.streamerbot.title">⚠️ Streamer.bot Actions Not Fo
18761876
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/purify.min.js"></script>
18771877
<script src="https://unpkg.com/@streamerbot/client/dist/streamerbot-client.js"></script>
18781878

1879-
<script src="js/i18n-settings.js?nocache=27"></script>
1880-
<script src="js/speakerbot.js?nocache=27"></script>
1879+
<script src="js/i18n-settings.js?nocache=28"></script>
1880+
<script src="js/speakerbot.js?nocache=28"></script>
18811881

1882-
<script type="module" src="js/settings.js?nocache=27"></script>
1882+
<script type="module" src="js/settings.js?nocache=28"></script>
18831883
</body>
18841884
</html>

beta/js/chatrd.js

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ const loadedEmotes = new Set();
8080

8181

8282
const SKINS = {
83-
default: "skin-default.css?nocache=27",
84-
nutting: "skin-nutting.css?nocache=27",
85-
kimballs: "skin-kimballs.css?nocache=27",
86-
bubbles: "skin-bubbles.css?nocache=27",
87-
'star-wars': "skin-star-wars.css?nocache=27"
83+
default: "skin-default.css?nocache=28",
84+
nutting: "skin-nutting.css?nocache=28",
85+
kimballs: "skin-kimballs.css?nocache=28",
86+
bubbles: "skin-bubbles.css?nocache=28",
87+
'star-wars': "skin-star-wars.css?nocache=28"
8888
};
8989

9090
const skinFile = SKINS[skin] || SKINS.default;
@@ -584,7 +584,9 @@ let chatcurrentFocus = -1;
584584
const chatInputSend = document.getElementById("chat-input-send");
585585
const chatInputSendAll = document.getElementById("chat-input-send-all");
586586
const chatInputForm = document.querySelector("#chat-input form");
587-
const chatInput = chatInputForm.querySelector("input[type=text]")
587+
const chatInput = chatInputForm.querySelector("input[type=text]");
588+
589+
const chatCommandsButton = chatInputForm.querySelector("#commands-button button");
588590

589591
let chatcommands;
590592

@@ -604,8 +606,10 @@ chatInput.addEventListener('input', function () {
604606
const value = this.value.trim();
605607
chatcommandslist.innerHTML = '';
606608
chatcurrentFocus = -1;
609+
607610
if (!value.startsWith('/')) return;
608-
Object.entries(chatcommands).forEach(([groupName, commands]) => {
611+
612+
Object.entries(chatcommands).forEach(([groupName, commands]) => {
609613

610614
const filtered = commands.filter(cmd => cmd.name.startsWith(value));
611615

@@ -624,6 +628,7 @@ chatInput.addEventListener('input', function () {
624628
});
625629
chatcommandslist.appendChild(item);
626630
});
631+
627632
});
628633
});
629634

@@ -649,6 +654,37 @@ chatInput.addEventListener('keydown', function (e) {
649654
}
650655
});
651656

657+
658+
659+
chatCommandsButton.addEventListener('click', (e) => {
660+
e.preventDefault();
661+
e.stopPropagation();
662+
663+
chatcommandslist.innerHTML = '';
664+
665+
Object.entries(chatcommands).forEach(([groupName, commands]) => {
666+
667+
const groupTitle = document.createElement('div');
668+
groupTitle.textContent = groupName;
669+
chatcommandslist.appendChild(groupTitle);
670+
671+
commands.forEach(cmd => {
672+
const item = document.createElement('div');
673+
item.classList.add('autocomplete-item');
674+
item.innerHTML = `<strong>${cmd.name}</strong><small> ${cmd.usage}</small>`;
675+
item.addEventListener('click', () => {
676+
chatInput.value = cmd.name + ' ';
677+
chatcommandslist.innerHTML = '';
678+
});
679+
chatcommandslist.appendChild(item);
680+
});
681+
682+
});
683+
684+
});
685+
686+
687+
652688
async function pushChatInputButtonsToSettings() {
653689
const buttons = document.querySelectorAll('#chat-input-platorms-buttons button');
654690

0 commit comments

Comments
 (0)