-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
383 lines (354 loc) · 17.1 KB
/
Copy pathindex.html
File metadata and controls
383 lines (354 loc) · 17.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Twitch Chat Animated Emotes Wall Overlay</title>
<script src="assets/js/jquery-3.6.0.min.js"></script>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<link rel="stylesheet" href="assets/css/bootstrap452.min.css">
<link rel="stylesheet" href="assets/css/dark.min.css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" rel="stylesheet">
<link rel="apple-touch-icon" sizes="57x57" href="assets/images/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="assets/images/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="assets/images/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="assets/images/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="assets/images/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="assets/images/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="assets/images/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="assets/images/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="assets/images/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="assets/images/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="assets/images/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/images/favicon-16x16.png">
</head>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
background-color: #181821;
color: #ddd9e8 !important;
}
a {
text-decoration: none !important;
color: #8c8dff !important;
}
a:hover, a:focus {
text-decoration: underline !important;
color: #a0a1ff !important;
}
.nav-pills a {
text-decoration: none !important;
color: #fff !important;
}
a i {
color: #ddd9e8;
}
a:hover i, a:focus i, a.active i {
color: #eef0f3;
}
.btn-link {
color: #ddd9e8 !important;
}
.muted {
color: #606085 !important;
}
.card,
.alert-dark {
background-color: #292938 !important;
border-color: #292938 !important;
color: #ddd9e8 !important;
}
.hide {
display: none;
}
.ml-0 {
margin-left: 0 !important;
}
.ml-4 {
margin-left: 1.5rem !important;
}
.pl-0 {
padding-left: 0 !important;
}
.pr-0 {
padding-right: 0 !important;
}
.dark-blue {
background-color: #1b2836 !important;
color: #fff !important;
}
.light-blue {
background-color: #354e69 !important;
color: #fff !important;
}
.btn-purple, .btn-purple:hover, .btn-purple:focus, .btn-purple:active {
background-color: #6441a5;
border-color: #523c7c;
}
</style>
<body>
<div class="container">
<div class="row pt-md-4 mb-4">
<ul class="nav nav-pills">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle active" data-toggle="dropdown" href="#" role="button"
aria-haspopup="true" aria-expanded="false">Twitch Tools</a>
<div class="dropdown-menu" id="main-nav">
</div>
</li>
</ul>
</div>
<div class="alert alert-info alert-dismissible fade show mb-4" role="alert">
<p style="margin: 0;">If you enjoy some of these tools, please consider <a href="https://www.teklynk.com/support" target="_blank" style="color: #007bff;">donating</a>. It helps support the online infrastructure that powers these projects.</p>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="card mb-2">
<div class="card-body shadow">
<h2>Twitch Chat Animated Emotes Wall Overlay</h2>
<p>This is a Twitch OBS overlay that displays emotes from Twitch chat. Emotes fly across the screen or stay on screen and pile up. Tested with 1000 emotes on screen at the same time. Emotes first appear from a random location on the screen and randomly move across the screen.</p>
<p>
<strong>Custom CSS options:</strong>
<br>
This is custom CSS that you can add to the OBS browser source CSS properties.
</p>
Add a drop shadow to emotes<br>
<code>
.latestblock img {
filter: drop-shadow(5px 5px 15px #00000090);
}
</code>
<br>
Flip emotes<br>
<code>
.latestblock img {
transform: scaleX(-1) !important;
}
</code>
<br>
Grayscale emotes<br>
<code>
.latestblock img {
filter: grayscale(100%) !important;
}
</code>
<br>
Pride <small>(rainbow)</small> behind emotes<br>
<code>
.latestblock img {
border-image: linear-gradient(red, orange, yellow, green, blue, violet) 25% 25% 25% 25% / 40px 40px !important;
}
</code>
<div class="text-center p-2 col-12">
<a class="btn btn-link btn-lg" href="https://github.com/teklynk/twitch_chat_emotes/blob/master/README.md" target="_blank" title="README"><i class="fa-brands fa-readme"></i></a>
<a class="btn btn-link btn-lg" href="https://github.com/teklynk/twitch_chat_emotes" target="_blank" title="GitHub"><i class="fa-brands fa-github"></i></a>
<a class="btn btn-link btn-lg" href="https://github.com/sponsors/teklynk" target="_blank" title="Donate/Support"><i class="fa-solid fa-dollar-sign"></i></a>
</div>
</div>
</div>
<br>
<div class="form-label-group mb-2">
<label for="mainAccount">Twitch Account</label>
<input type="text" id="mainAccount" class="form-control shadow">
</div>
<div class="form-label-group mb-2">
<label for="botAccount">Bot Account
<small>(optional)</small>
</label>
<input type="text" id="botAccount" class="form-control shadow">
<small class="form-text text-muted">If set, this will only display emotes from the bot account/user. This can
also be set to use your main Twitch account/user. Great for alerts that use a bot account.
</small>
</div>
<hr>
<h2>Options</h2>
<div class="form-check mb-3">
<input class="form-check-input shadow" type="checkbox" value="" id="bttv">
<label class="form-check-label" for="bttv">
Allow BetterTTV Emotes<br>
<small class="text-muted">This will display BetterTTV emotes that have been set for your channel as well as global emotes.</small>
</label>
</div>
<div class="form-check mb-3">
<input class="form-check-input shadow" type="checkbox" value="" id="7tv">
<label class="form-check-label" for="7tv">
Allow SevenTV Emotes<br>
<small class="text-muted">This will display SevenTV emotes that have been set for your channel as well as global emotes.</small>
</label>
</div>
<div class="form-check mb-3">
<input class="form-check-input shadow" type="checkbox" value="" id="ffz">
<label class="form-check-label" for="ffz">
Allow FrankerFacez Emotes<br>
<small class="text-muted">This will display FrankerFacez emotes that have been set for your channel as well as global emotes.</small>
</label>
</div>
<div class="form-group range-slider">
<label for="emoteLimit">Limit
<small>(Number of emotes to allow from each message)</small>
</label>
<input type="range" max="100" min="10" step="10" class="form-control range-slider-range shadow" id="emoteLimit"
value="50" style="height: 0;">
<small class="text-muted range-slider-value"></small>
<small class="text-muted range-slider-value">Emotes</small>
</div>
<div class="form-group range-slider">
<label for="speed">Speed</label>
<input type="range" max="30" min="1" step="1" class="form-control range-slider-range shadow" id="speed"
value="5" style="height: 0;">
<small class="text-muted range-slider-value"></small>
<small class="text-muted range-slider-value"> Seconds</small>
</div>
<div class="form-group range-slider">
<label for="duration">Duration</label>
<input type="range" max="120" min="1" step="1" class="form-control range-slider-range shadow" id="duration"
value="15" style="height: 0;">
<small class="text-muted range-slider-value"></small>
<small class="text-muted range-slider-value"> Seconds</small>
</div>
<div class="form-group">
<label for="size">Default Sizes</label>
<select class="form-control shadow" id="size">
<option value="1">28x28</option>
<option value="2" selected>56x56</option>
<option value="3">112x112</option>
<option value="random">Random</option>
</select>
<small class="form-text text-muted">28x28, 56x56, 112x112, Random</small>
</div>
<div class="form-group range-slider">
<label for="customsize">Custom Size
<small>(0 = disabled)</small>
</label>
<input type="range" max="500" min="0" step="10" class="form-control range-slider-range shadow" id="customsize"
value="0" style="height: 0;">
<small class="text-muted range-slider-value"></small>
<small class="text-muted range-slider-value"> px</small>
</div>
<div class="form-group">
<label>Effects</label>
<div class="form-check mb-2">
<input class="form-check-input shadow effect-checkbox" type="checkbox" value="fade" id="effect_fade">
<label class="form-check-label" for="effect_fade">Fade</label>
</div>
<div class="form-check mb-2">
<input class="form-check-input shadow effect-checkbox" type="checkbox" value="pop_in" id="effect_pop_in">
<label class="form-check-label" for="effect_pop_in">Pop-in</label>
</div>
<div class="form-check mb-2">
<input class="form-check-input shadow effect-checkbox" type="checkbox" value="grow" id="effect_grow">
<label class="form-check-label" for="effect_grow">Grow</label>
</div>
<div class="form-check mb-2">
<input class="form-check-input shadow effect-checkbox" type="checkbox" value="rotate" id="effect_rotate">
<label class="form-check-label" for="effect_rotate">Rotate</label>
</div>
<div class="form-check mb-2">
<input class="form-check-input shadow effect-checkbox" type="checkbox" value="skew" id="effect_skew">
<label class="form-check-label" for="effect_skew">Skew</label>
</div>
<div class="form-check mb-2">
<input class="form-check-input shadow effect-checkbox" type="checkbox" value="bottom_top" id="effect_bottom_top">
<label class="form-check-label" for="effect_bottom_top">Bottom to Top</label>
</div>
<div class="form-check mb-2">
<input class="form-check-input shadow effect-checkbox" type="checkbox" value="top_bottom" id="effect_top_bottom">
<label class="form-check-label" for="effect_top_bottom">Top to Bottom</label>
</div>
<div class="form-check mb-2">
<input class="form-check-input shadow effect-checkbox" type="checkbox" value="left_right" id="effect_left_right">
<label class="form-check-label" for="effect_left_right">Left to Right</label>
</div>
<div class="form-check mb-2">
<input class="form-check-input shadow effect-checkbox" type="checkbox" value="right_left" id="effect_right_left">
<label class="form-check-label" for="effect_right_left">Right to Left</label>
</div>
</div>
<div class="form-check mt-4">
<input class="form-check-input shadow" type="checkbox" value="" id="fishtank">
<label class="form-check-label" for="fishtank">
Fish Tank Mode
</label>
<small class="form-text text-muted">Emotes will persist on screen until you refresh the browser source.</small>
</div>
<br>
<button class="btn btn-lg btn-success btn-block text-white shadow" id="generate_button" type="button">Generate Overlay Link</button>
<br>
<div id="overlaylink" class="hide"></div>
</div>
<div class="text-center p-2 col-12">
<a class="btn btn-link btn-lg" href="https://github.com/teklynk/twitch_chat_emotes/blob/master/README.md" target="_blank" title="README"><i class="fa-brands fa-readme"></i></a>
<a class="btn btn-link btn-lg" href="https://github.com/teklynk/twitch_chat_emotes" target="_blank" title="GitHub"><i class="fa-brands fa-github"></i></a>
<a class="btn btn-link btn-lg" href="https://github.com/sponsors/teklynk" target="_blank" title="Donate/Support"><i class="fa-solid fa-dollar-sign"></i></a>
</div>
<div class="container text-center p-4">
<small class="muted">Made with <i class="fa fa-heart vertical-middle"></i> by <a href="https://www.teklynk.com" target="_blank">Teklynk</a></small>
</div>
<script>
const API_SERVER = 'https://twitchapi.teklynk.com';
$(document).ready(function () {
let rangeSlider = function rangeSlider() {
let slider = $('.range-slider'),
range = $('.range-slider-range'),
value = $('.range-slider-value');
slider.each(function () {
value.each(function () {
let value = $(this).prev().attr('value');
$(this).html(value);
});
range.on('input', function () {
$(this).next(value).html(this.value);
});
});
};
rangeSlider();
// Check if any input fields have changed
$(":text,textarea,:checkbox,input[type=range],select").on('change', function (e) {
$("#overlaylink").addClass("hide");
});
document.getElementById("generate_button").addEventListener("click", function (e) {
let mainAccount = document.getElementById("mainAccount").value;
let botAccount = document.getElementById("botAccount").value;
let duration = document.getElementById("duration").value;
duration = duration + '000'; // convert seconds to milliseconds
let speed = document.getElementById("speed").value;
speed = speed + '000'; // convert seconds to milliseconds
let size = document.getElementById("size").value;
let selectedEffects = [];
document.querySelectorAll('.effect-checkbox:checked').forEach(checkbox => {
selectedEffects.push(checkbox.value);
});
let effect = selectedEffects.length > 0 ? selectedEffects.join(',') : '';
let customsize = document.getElementById("customsize").value;
let fishtank = document.getElementById("fishtank").checked;
let bttv = document.getElementById("bttv").checked;
let seventv = document.getElementById("7tv").checked;
let ffz = document.getElementById("ffz").checked;
let emoteLimit = document.getElementById("emoteLimit").value;
if (!mainAccount) {
alert('Twitch username is not set');
}
//build overlay url
if (mainAccount) {
let srcURL = window.location.protocol + "//" + window.location.host + window.location.pathname;
let fullUrl = srcURL + "bot.html?channel=" + mainAccount + "&bot=" + botAccount + "&speed=" + speed + "&duration=" + duration + "&size=" + size + "&customsize=" + customsize + "&fishtank=" + fishtank + "&effect=" + effect + "&emoteLimit=" + emoteLimit + "&bttv=" + bttv + "&7tv=" + seventv + "&ffz=" + ffz + "";
fullUrl = fullUrl.replace("index.htmlbot.html", "bot.html");
document.getElementById("overlaylink").classList.remove("hide");
document.getElementById("overlaylink").innerHTML = "<p>Add this link as a browser source in OBS. Set width to 1920x1080.<br>" +
"<a href='" + fullUrl + "' target='_blank'>" + fullUrl + "</a></p>";
}
});
});
// Json data - Ajax call
let nav_json = JSON.parse($.getJSON({
'url': API_SERVER + "/getnav.php",
'async': false
}).responseText);
$.each(nav_json, function (i, val) {
$('<a class="dropdown-item" href="' + val.url + '">' + val.name + '</a>').appendTo('#main-nav');
});
</script>
</body>
</html>