-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
254 lines (245 loc) · 12.7 KB
/
Copy pathindex.html
File metadata and controls
254 lines (245 loc) · 12.7 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
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MultiChat for Streamers</title>
<link rel="icon" type="image/png" href="favicon.png">
<!-- Google Fonts: Inter & JetBrains Mono for clean, highly legible stream text -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
rel="stylesheet">
<!-- Request local styles before body parsing to prevent unstyled hidden UI from flashing. -->
<script>
(function () {
const version = Date.now();
window.__MULTICHAT_ASSET_VERSION__ = version;
const cssFiles = [
'css/style.css',
'css/twitch-user-popup.css'
];
cssFiles.forEach((file) => {
const link = document.createElement('link');
link.rel = 'stylesheet';
link.setAttribute('blocking', 'render');
link.href = `${file}?v=${version}`;
link.addEventListener('error', () => {
console.error(`[MultiChat Loader] Failed to load CSS: ${file}`);
});
document.head.appendChild(link);
});
})();
</script>
</head>
<body class="dark-theme">
<!-- Header / Control Bar -->
<header class="app-header">
<div class="header-left">
<div class="status-indicators" id="statusIndicators">
<span class="status-badge status-twitch offline" id="statusTwitch" title="Twitch">
<span class="platform-icon twitch-icon"></span> TW </span>
<span class="status-badge status-kick offline" id="statusKick" title="Kick">
<span class="platform-icon kick-icon"></span> KI <span id="kickViewerCount" class="viewer-count"></span>
</span>
<span class="status-badge status-vk offline" id="statusVk" title="ВК">
<span class="platform-icon vk-icon"></span> VK </span>
<span class="status-badge status-youtube offline" id="statusYoutube" title="YT">
<span class="platform-icon youtube-icon"></span> YT </span>
</div>
</div>
<div class="header-right">
<button class="btn btn-icon" id="openSettingsBtn" title="Настройки">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="3"></circle>
<path
d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z">
</path>
</svg>
</button>
</div>
</header>
<!-- Main Chat Feed Container -->
<main class="chat-container" id="chatContainer">
<div class="chat-messages" id="chatMessages">
<div class="chat-line"><a href="https://annacodit.github.io/MultiChat/">https://annacodit.github.io/MultiChat/</a>
</div>
</div>
<button id="unreadBadge" class="unread-badge hidden" type="button" aria-label="Прокрутить к новым сообщениям">
<span id="unreadBadgeText">↓ 0 сообщений</span>
</button>
</main>
<!-- Twitch user profile popup; it is populated only for Twitch chat authors. -->
<div class="twitch-user-popup hidden" id="twitchUserPopup" role="dialog" aria-label="Профиль пользователя Twitch"
aria-hidden="true">
<div class="twitch-user-popup-header">
<img class="twitch-user-popup-avatar" id="twitchUserAvatar" alt="" hidden>
<div class="twitch-user-popup-heading">
<strong class="twitch-user-popup-name" id="twitchUserName"></strong>
<span class="twitch-user-popup-status" id="twitchUserStatus" aria-live="polite">Загрузка профиля...</span>
</div>
<button class="twitch-user-popup-close" id="closeTwitchUserPopup" type="button"
aria-label="Закрыть профиль пользователя">×</button>
</div>
<div class="twitch-user-popup-links">
<a id="twitchUserHistoryLink" aria-disabled="true">История сообщений</a>
<a id="twitchUserChannelLink" aria-disabled="true" target="_blank" rel="noopener noreferrer">Канал
пользователя</a>
</div>
</div>
<!-- Settings Modal Overlay -->
<div class="modal-overlay hidden" id="settingsModal">
<div class="modal-card">
<div class="modal-header">
<h2>Настройки каналов и фильтрации</h2>
<button class="modal-close" id="closeSettingsBtn">×</button>
</div>
<div class="modal-body">
<form id="settingsForm">
<!-- Platform Channel Inputs -->
<section class="settings-group">
<h3>Каналы трансляций</h3>
<p class="settings-hint">Укажите имя канала или логин для каждой платформы:</p>
<div class="form-row">
<label for="twitchChannel">
<span class="platform-icon twitch-icon"></span> Twitch </label>
<input type="text" id="twitchChannel" placeholder="например, streamer_name">
</div>
<div class="form-row">
<label for="kickChannel">
<span class="platform-icon kick-icon"></span> Kick </label>
<input type="text" id="kickChannel" placeholder="например, streamer_name или Chatroom ID">
</div>
<div class="form-row">
<label for="vkChannel">
<span class="platform-icon vk-icon"></span> ВК </label>
<input type="text" id="vkChannel" placeholder="например, streamer_name">
</div>
<div class="form-row">
<label for="youtubeChannel">
<span class="platform-icon youtube-icon"></span> YouTube (YT) </label>
<input type="text" id="youtubeChannel" placeholder="Имя канала (@handle) или ID трансляции">
</div>
</section>
<!-- Streamer Nicknames & Mentions -->
<section class="settings-group">
<h3>Дополнительные никнеймы стримера</h3>
<p class="settings-hint">По умолчанию использую имена указанных каналов. Добавьте другие варианты через
запятую:</p>
<div class="form-row">
<input type="text" id="extraNicknames" placeholder="например: Anya, AnnaStream, Аня">
</div>
</section>
<!-- Chatter-to-Chatter Reply Filtering -->
<section class="settings-group">
<h3>Фильтрация диалогов чаттерсов</h3>
<p class="settings-hint">Скрывать ответы чаттерсов друг другу, чтобы не отвлекаться во время стрима.
Сообщения, адресованные вам, скрываться не будут.</p>
<div class="toggle-row">
<div class="toggle-info">
<span class="toggle-title">Скрывать общение чаттерсов между собой</span>
<span class="toggle-sub">Сворачивает сообщения в компактную плашку «[чаттерсы общаются]»</span>
</div>
<label class="switch">
<input type="checkbox" id="hideChatterReplies" checked>
<span class="slider round"></span>
</label>
</div>
</section>
<!-- Emotes Options -->
<section class="settings-group">
<h3>Смайлики (7TV, BTTV, FFZ)</h3>
<div class="toggle-row">
<div class="toggle-info">
<span class="toggle-title">Загружать сторонние смайлики (7TV / BTTV / FFZ)</span>
<span class="toggle-sub">Автоматически подтягивает глобальные и канальные смайлы</span>
</div>
<label class="switch">
<input type="checkbox" id="enableThirdPartyEmotes" checked>
<span class="slider round"></span>
</label>
</div>
</section>
<!-- Twitch Badge Options -->
<section class="settings-group">
<h3>Бейджики пользователей Twitch</h3>
<div class="toggle-row">
<div class="toggle-info">
<span class="toggle-title">Скрывать бейджики пользователей Twitch</span>
<span class="toggle-sub">Бейджики остаются в DOM, но не отображаются в чате</span>
</div>
<label class="switch">
<input type="checkbox" id="hideTwitchBadges">
<span class="slider round"></span>
</label>
</div>
</section>
<!-- Font Size Options -->
<section class="settings-group">
<h3>Размер шрифта чата</h3>
<div class="range-row">
<input type="range" id="fontSizeRange" min="12" max="24" value="16" step="1">
<span id="fontSizeVal">16px</span>
</div>
</section>
<!-- First Message Window Hours Option -->
<section class="settings-group">
<h3>Интервал первого сообщения</h3>
<p class="settings-hint">Считать сообщение первым за стрим, если зритель не писал в чат (в часах):</p>
<div class="form-row">
<input type="number" id="firstMessageWindowHours" min="1" max="168" value="12" style="width: 100px;">
<span style="font-size: 0.9em; color: var(--text-muted); margin-left: 8px;">часов</span>
</div>
</section>
<!-- Max Chat Messages Limit Option -->
<section class="settings-group">
<h3>Лимит сообщений в ленте</h3>
<p class="settings-hint">Максимальное количество одновременно отображаемых сообщений в чате:</p>
<div class="form-row">
<input type="number" id="maxChatMessages" min="20" max="1000" value="200" style="width: 100px;">
<span style="font-size: 0.9em; color: var(--text-muted); margin-left: 8px;">сообщений</span>
</div>
</section>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-primary" id="saveSettingsBtn">Сохранить и подключиться</button>
</div>
</div>
</div>
<!-- Local scripts reuse the page-load version created by the early CSS loader. -->
<script>
(function () {
const version = window.__MULTICHAT_ASSET_VERSION__ || Date.now();
// Keep dependency order explicit: app.js depends on every file above it.
const jsFiles = [
'js/utils.js',
'js/settings.js',
'js/chatterTracker.js',
'js/filter.js',
'js/emotes.js',
'js/connectors/twitch.js',
'js/connectors/kick.js',
'js/connectors/vklive.js',
'js/connectors/youtube.js',
'js/twitchUserPopup.js',
'js/app.js'
];
const withVersion = (file) => `${file}?v=${version}`;
jsFiles.forEach((file) => {
const script = document.createElement('script');
script.src = withVersion(file);
// Preserve the execution order of the original static script tags.
script.async = false;
script.addEventListener('error', () => {
console.error(`[MultiChat Loader] Failed to load JavaScript: ${file}`);
});
document.body.appendChild(script);
});
console.log(`[MultiChat Loader] Local assets requested with version ${version}.`);
})();
</script>
</body>
</html>