-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathconfig-maker.html
580 lines (549 loc) · 40 KB
/
config-maker.html
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
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>EsportsHelper Config Maker</title>
<meta name="description" content="Generate config.yaml for EsportsHelper with this easy-to-use form.">
<meta name="robots" content="index, follow">
<meta name="author" content="RedR00t">
<link rel="canonical" href="https://www.example.com/config-maker">
<meta name="language" content="en">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
</head>
<body>
<div class="container mt-5">
<div class="form-group" style="width: 50%; float: left;">
<label for="lang">Page Language</label>
<select class="form-control" id="lang" onchange="changeLanguage()">
<option value="" disabled selected>Select Page language(选择语言)</option>
<option value="en_US">en_US</option>
<option value="zh_CN">zh_CN</option>
<option value="zh_TW">zh_TW</option>
<option value="es_ES">es_ES</option>
</select>
</div>
<div style="text-align: center;">
<h1 style="color: #3498db;">EsportsHelper Config Maker</h1>
</div>
<br><hr>
<form id="configForm">
<!-- Required fields -->
<h5 class="mt-3">Required fields</h5>
<div class="form-group">
<label for="username" id=username-label>Username</label>
<input type="text" class="form-control" id="username" placeholder="Riot account username" value="username">
<small class="form-text text-muted" id=username-small>Riot Games account username</small>
</div>
<div class="form-group">
<label for="password" id=password-label>Password</label>
<input type="password" class="form-control" id="password" placeholder="Riot account password" value="password">
<small class="form-text text-muted" id=password-small>Riot Games account password</small>
</div>
<!-- Optional fields -->
<h5 class="mt-3">Optional</h5>
<div class="form-group">
<label for="delay" id=delay-label>Delay (in seconds)</label>
<input type="number" class="form-control" id="delay" placeholder="600">
<small class="form-text text-muted" id=delay-small>Time interval for each check in seconds (600 seconds by default). Each check time will fluctuate randomly between 0.8
and 1.5 times
the time delay you set.</small>
</div>
<div class="form-group">
<label for="headless" id=headless-label>Headless</label>
<select class="form-control" id="headless">
<option value="" disabled selected>Select option</option>
<option value="True">Enabled</option>
<option value="False">Disabled</option>
</select>
<small class="form-text text-muted" id=headless-small>When set to True, the program will run in the background; otherwise, it will open a browser window (False by
default).</small>
</div>
<div class="form-group">
<label for="nickName" id=nickName-label>Nickname</label>
<input type="text" class="form-control" id="nickName" placeholder="username">
<small class="form-text text-muted" id=nickName-small>Nickname for added account, "username" by default.</small>
</div>
<div class="form-group">
<label for="mode" id=mode-label>Mode</label>
<select class="form-control" id="mode">
<option value="" disabled selected>Select mode</option>
<option value="safe">safe</option>
<option value="normal">normal</option>
</select>
<small class="form-text text-muted" id=mode-small>Mode selection: "safe" for Safe mode, "normal" for regular mode, the default is "safe." Check the GitHub page for more
details.</small>
</div>
<div class="form-group">
<label for="briefLogLength" id=briefLogLength-label>Length of log brief information</label>
<input type="number" class="form-control" id="briefLogLength" placeholder="10">
<small class="form-text text-muted" id=briefLogLength-small>Length of log brief information. Default is 10.</small>
</div>
<div class="form-group">
<label for="onlyWatchMatches" id=onlyWatchMatches-label>Leagues to watch (separate by commas)</label>
<input type="text" class="form-control" id="onlyWatchMatches" placeholder="lcs,lla,lpl,lck,ljl-japan,lco,lec,cblol-brazil,pcs,tft_esports">
<small class="form-text text-muted" id=onlyWatchMatches-small>Leagues to watch, separated by commas (e.g., lcs, lla, lpl). Please note, names should be in
lowercase.</small>
</div>
<div class="form-group">
<label for="disWatchMatches" id=disWatchMatches-label>Leagues to ignore (separate by commas)</label>
<input type="text" class="form-control" id="disWatchMatches" placeholder="">
<small class="form-text text-muted" id=disWatchMatches-small>Leagues to ignore, separated by commas (e.g., lms, cbol). Please note, names should be in
lowercase.</small>
</div>
<div class="form-group">
<label for="language" id=language-label>Language</label>
<select class="form-control" id="language">
<option value="" disabled selected>Select language</option>
<option value="en_US">en_US</option>
<option value="zh_CN">zh_CN</option>
<option value="zh_TW">zh_TW</option>
<option value="es_ES">es_ES</option>
</select>
<small class="form-text text-muted" id=language-small>Language selection for the program interface.</small>
</div>
<div class="form-group">
<label for="maxStream" id=maxStream-label>Max number of matches to watch at the same time</label>
<input type="number" class="form-control" id="maxStream" placeholder="4">
<small class="form-text text-muted" id=maxStream-small>The maximum number of matches that can be watched at the same time, beyond which they will not be watched.
Default is 4.</small>
</div>
<div class="form-group">
<label for="maxRunHours" id=maxRunHours-label>Max run hours</label>
<input type="number" class="form-control" id="maxRunHours" placeholder="-1">
<small class="form-text text-muted" id=maxRunHours-small>Negative value means always running; positive value is running by hours. Default -1.</small>
</div>
<div class="form-group">
<label for="proxy" id=proxy-label>Proxy address</label>
<input type="text" class="form-control" id="proxy" placeholder="">
<small class="form-text text-muted" id=proxy-small>Proxy address, not required for general users (e.g., "127.0.0.1:7890").</small>
</div>
<div class="form-group">
<label for="connectorDropsUrl" id=connectorDropsUrl-label>Discord webhook link</label>
<input type="text" class="form-control" id="connectorDropsUrl" placeholder="">
<small class="form-text text-muted" id=connectorDropsUrl-small>Discord webhook link for connector drops.</small>
</div>
<div class="form-group">
<label for="exportDrops" id=exportDrops-label>Export drop details file</label>
<select class="form-control" id="exportDrops">
<option value="" disabled selected>Select option</option>
<option value="True">Enabled</option>
<option value="False">Disabled</option>
</select>
<small class="form-text text-muted" id=exportDrops-small>Whether or not you need to export the total drop details file, it will only be generated when the script is
opened.</small>
</div>
<div class="form-group">
<label for="platForm" id=platForm-label>Platform</label>
<input type="text" class="form-control" id="platForm" placeholder="windows">
<small class="form-text text-muted" id=platForm-small>Operating system platform. Windows is set by default. If you want to use the program on Linux, please change the
value here.</small>
</div>
<div class="form-group">
<label for="arm64" id=arm64-label>Enable support for using Chromium on Linux ARM64</label>
<select class="form-control" id="arm64">
<option value="" disabled selected>Select option</option>
<option value="True">Enabled</option>
<option value="False">Disabled</option>
</select>
<small class="form-text text-muted" id=arm64-small>Enable support for using Chromium on Linux ARM64, requires platForm: "linux" and having the chromedriver in
"/home/USERNAME/.local/share/undetected_chromedriver/chromedriver", more info: <a
href="https://github.com/Yudaotor/EsportsHelper/wiki/The-Way-Using-Chromium-on-ARM64" target="_blank">https://github.com/Yudaotor/EsportsHelper/wiki/The-Way-Using-Chromium-on-ARM64</a></small>
</div>
<div class="form-group">
<label for="closeStream" id=closeStream-label>Delete video-player elements to save traffic</label>
<select class="form-control" id="closeStream">
<option value="" disabled selected>Select option</option>
<option value="True">Enabled</option>
<option value="False">Disabled</option>
</select>
<small class="form-text text-muted" id=closeStream-small>Option of deleting video-player elements to save traffic (Risk).</small>
</div>
<div class="form-group">
<label for="desktopNotify" id=desktopNotify-label>Enable Desktop notifications</label>
<select class="form-control" id="desktopNotify">
<option value="" disabled selected>Select option</option>
<option value="True">Enabled</option>
<option value="False">Disabled</option>
</select>
<small class="form-text text-muted" id=desktopNotify-small>Experimental feature to enable Desktop notifications.</small>
</div>
<div class="form-group">
<label for="sleepPeriod" id=sleepPeriod-label>Hibernation period (Start hour - End hour)</label>
<input type="text" class="form-control" id="sleepPeriod" placeholder="8-13, 20-23">
<small class="form-text text-muted" id=sleepPeriod-small>Hibernation period, empty by default, allowed multiple periods. The format is "Start hour – End hour". Tabs
will be closed and
reopened at the end of sleep.</small>
</div>
<div class="form-group">
<label for="ignoreBroadCast" id=ignoreBroadCast-label>Ignore broadcasts</label>
<select class="form-control" id="ignoreBroadCast">
<option value="" disabled selected>Select option</option>
<option value="True">Enabled</option>
<option value="False">Disabled</option>
</select>
<small class="form-text text-muted" id=ignoreBroadCast-small>Option to ignore broadcasts.</small>
</div>
<div class="form-group">
<label for="userDataDir" id=userDataDir-label>Path to Chrome cookie files</label>
<input type="text" class="form-control" id="userDataDir" placeholder="C:\\Users\\xxxxx\\AppData\\Local\\Google\\Chrome\\User Data">
<small class="form-text text-muted" id=userDataDir-small>Path to Chrome cookie files.</small>
</div>
<div class="form-group">
<label for="chromePath" id=chromePath-label>Chrome.exe location</label>
<input type="text" class="form-control" id="chromePath" placeholder="X:\\xxxxx\\xx\\Chrome.exe">
<small class="form-text text-muted" id=chromePath-small>Chrome.exe location.</small>
</div>
<div class="form-group">
<label for="countDrops" id=countDrops-label>Monitor Drops number</label>
<select class="form-control" id="countDrops">
<option value="" disabled selected>Select option</option>
<option value="True">Enabled</option>
<option value="False">Disabled</option>
</select>
<small class="form-text text-muted" id=countDrops-small>Option to monitor Drops number.</small>
</div>
<div class="form-group">
<label for="autoSleep" id=autoSleep-label>Toggle for auto-sleep mode</label>
<select class="form-control" id="autoSleep">
<option value="" disabled selected>Select option</option>
<option value="True">Enabled</option>
<option value="False">Disabled</option>
</select>
<small class="form-text text-muted" id=autoSleep-small>Toggle for auto-sleep mode: sleeping while no matches live, waking up when a match goes live (True by
default).</small>
</div>
<div class="form-group">
<label for="debug" id=debug-label>Debug mode</label>
<select class="form-control" id="debug">
<option value="" disabled selected>Select option</option>
<option value="True">Enabled</option>
<option value="False">Disabled</option>
</select>
<small class="form-text text-muted" id=debug-small>Debug mode, default is False.</small>
</div>
<div class="form-group">
<label for="isDockerized" id=isDockerized-label>Dockerized mode</label>
<select class="form-control" id="isDockerized">
<option value="" disabled selected>Select option</option>
<option value="True">Enabled</option>
<option value="False">Disabled</option>
</select>
<small class="form-text text-muted" id=isDockerized-small>Run EsportsHelper on Docker container, default is False.</small>
</div>
<button type="button" class="btn btn-primary mt-3" onclick="generateYAML()" id="generate-button">Generate and Download config.yaml</button>
</form>
</div>
<script>
function changeLanguage() {
var selectedLanguage = document.getElementById("lang").value;
var textMappings = {
'en_US': {
'username-label': 'Username',
'password-label': 'Password',
'delay-label': 'Delay (in seconds)',
'headless-label': 'Headless',
'nickName-label': 'Nickname',
'mode-label': 'Mode',
'briefLogLength-label': 'Length of log brief information',
'onlyWatchMatches-label': 'Leagues to watch (separate by commas)',
'disWatchMatches-label': 'Leagues to ignore (separate by commas)',
'maxStream-label': 'Max number of matches to watch at the same time',
'maxRunHours-label': 'Max run hours',
'proxy-label': 'Proxy address',
'language-label': 'Language',
'connectorDropsUrl-label': 'Discord webhook link',
'exportDrops-label': 'Export drop details file',
'platForm-label': 'Platform',
'arm64-label': 'Enable support for using Chromium on Linux ARM64',
'closeStream-label': 'Delete video-player elements to save traffic',
'desktopNotify-label': 'Enable Desktop notifications',
'sleepPeriod-label': 'Hibernation period (Start hour - End hour)',
'ignoreBroadCast-label': 'Ignore broadcasts',
'userDataDir-label': 'Path to Chrome cookie files',
'chromePath-label': 'Chrome.exe location',
'countDrops-label': 'Monitor Drops number',
'autoSleep-label': 'Toggle for auto-sleep mode',
'debug-label': 'Debug mode',
'isDockerized-label': 'Dockerized mode',
'username-small': 'Riot Games account username',
'password-small': 'Riot Games account password',
'delay-small': 'Time interval for each check in seconds (600 seconds by default). Each check time will fluctuate randomly between 0.8 and 1.5 times the time delay you set.',
'headless-small': 'When set to True, the program will run in the background; otherwise, it will open a browser window (False by default).',
'nickName-small': 'Nickname for added account, "username" by default.',
'mode-small': 'Mode selection: "safe" for Safe mode, "normal" for regular mode,the default is "safe." Check the GitHub page for more details.',
'briefLogLength-small': 'Length of log brief information. Default is 10.',
'onlyWatchMatches-small': 'Leagues to watch, separated by commas (e.g., lcs, lla, lpl). Please note, names should be in lowercase.',
'disWatchMatches-small': 'Leagues to ignore, separated by commas (e.g., lms, cblol). Please note, names should be in lowercase.',
'language-small': 'Language selection for the program interface.',
'maxStream-small': 'The maximum number of matches that can be watched at the same time,beyond which they will not be watched. Default is 4.',
'maxRunHours-small': 'Negative value means always running; positive value is running by hours. Default -1.',
'proxy-small': 'Proxy address, not required for general users (e.g.,"127.0.0.1:7890").',
'connectorDropsUrl-small': 'Discord webhook link for connector drops.',
'exportDrops-small': 'Whether or not you need to export the total drop details file, it will only be generated when the script is opened.',
'platForm-small': 'Operating system platform. Windows is set by default. If you want to use the program on Linux, please change the value here.',
'arm64-small': 'Enable support for using Chromium on Linux ARM64, requires platForm: "linux" and having the chromedriver in "/home/USERNAME/.local/share/undetected_chromedriver/chromedriver", more info: https://github.com/Yudaotor/EsportsHelper/wiki/The-Way-Using-Chromium-on-ARM64',
'closeStream-small': 'Option of deleting video-player elements to save traffic(Risk).',
'desktopNotify-small': 'Experimental feature to enable Desktop notifications.',
'sleepPeriod-small': 'Hibernation period, empty by default, allowed multiple periods. The format is Start hour – End hour. Tabs will be closed and reopened at the end of sleep.',
'ignoreBroadCast-small': 'Option to ignore broadcasts.',
'userDataDir-small': 'Path to Chrome cookie files.',
'chromePath-small': 'Chrome.exe location.',
'countDrops-small': 'Option to monitor Drops number, default is True.',
'autoSleep-small': 'Toggle for auto-sleep mode: sleeping while no matches live, waking up when a match goes live (True by default).',
'debug-small': 'Debug mode, default is False.',
'isDockerized-small': 'Run EsportsHelper on Docker container, default is False.',
'generate-button': 'Generate and Download config.yaml',
},
'zh_CN': {
'username-label': '用户名',
'password-label': '密码',
'delay-label': '延迟(秒)',
'headless-label': '无头浏览',
'nickName-label': '昵称',
'mode-label': '模式',
'briefLogLength-label': '简要日志信息长度',
'onlyWatchMatches-label': '只观看的联赛(逗号分隔)',
'disWatchMatches-label': '需忽略的联赛(逗号分隔)',
'maxStream-label': '同时观看的最大比赛场次',
'maxRunHours-label': '最大运行小时数',
'language-label': '显示语言',
'proxy-label': '代理地址',
'connectorDropsUrl-label': 'Webhook掉落提醒链接',
'exportDrops-label': '导出掉落详情文件',
'platForm-label': '系统平台',
'arm64-label': '启用对 Linux ARM64 上 Chromium 的支持',
'closeStream-label': '删除视频播放器元素以节省流量',
'desktopNotify-label': '启用桌面通知',
'sleepPeriod-label': '休眠时段(起始小时 - 结束小时)',
'ignoreBroadCast-label': '忽略转播状态',
'userDataDir-label': 'Chrome Cookie 文件路径',
'chromePath-label': 'Chrome.exe 路径',
'countDrops-label': '监视掉落数量',
'autoSleep-label': '自动休眠模式开关',
'debug-label': '调试模式',
'isDockerized-label': 'Dockerized 模式',
'username-small': 'Riot Games 账号用户名',
'password-small': 'Riot Games 账号密码',
'delay-small': '每次检查的时间间隔,单位为秒(默认为 600 秒),每次检查时间会在你设置的时间间隔的 0.8 到 1.5 倍之间随机波动。',
'headless-small': '设置为 True 时,程序将在后台运行;否则,将打开一个浏览器窗口(默认为 False)。',
'nickName-small': '添加账号的昵称,默认为“username”。',
'mode-small': '模式选择:“safe”为安全模式,“normal”为正常模式,默认为“safe”。更多详情请查看 GitHub 页面。',
'briefLogLength-small': '日志简要信息长度,默认为 10。',
'onlyWatchMatches-small': '只观看的联赛(逗号分隔)注意:需要小写',
'disWatchMatches-small': '需忽略的联赛(逗号分隔)注意:需要小写',
'maxStream-small': '同时观看的最大比赛场次,超过该数量的比赛将不会被观看,默认为 4。',
'maxRunHours-small': '负数表示一直运行;正数表示运行小时数,默认为 -1。',
'language-small': '显示语言,默认为“en_US”。',
'proxy-small': '代理地址,一般用户不需要填写',
'connectorDropsUrl-small': 'webhook链接,用于掉落提醒。支持Discord, 钉钉, 饭碗警告, 企业微信, 飞书,具体详见wiki',
'exportDrops-small': '是否需要导出掉落详情文件,仅在脚本开启时才会生成。',
'platForm-small': '操作系统平台,默认为 Windows。如果你想在 Linux 上使用本程序,请在此处更改为linux',
'arm64-small': '启用对 Linux ARM64 上 Chromium 的支持,需要 platForm: "linux" 以及将 chromedriver 放置在 "/home/USERNAME/.local/share/undetected_chromedriver/chromedriver",更多信息请查看 GitHub wiki。',
'closeStream-small': '删除视频播放器元素以节省流量。',
'desktopNotify-small': '启用windows桌面通知。',
'sleepPeriod-small': '休眠时段,格式为 起始小时 - 结束小时,默认为空。在休眠时段,所有标签页将被关闭,休眠结束后将重新打开。',
'ignoreBroadCast-small': '忽略转播状态,如果设置为True,将忽略转播状态',
'userDataDir-small': 'Chrome Cookie 文件路径,如果你想使用自己的缓存信息,请在此处填写userDataDir的路径。',
'chromePath-small': 'Chrome.exe 路径,如果你想使用自己的 Chrome.exe,请在此处填写 Chrome.exe 的路径。',
'countDrops-small': '是否检查掉落数量',
'autoSleep-small': '自动休眠模式开关,打开后没比赛时会自动休眠',
'debug-small': '调试模式,开启后会在发生错误时截图',
'isDockerized-small': '在 Docker 容器上运行 EsportsHelper,默认为 False。',
'generate-button': '生成及下载config.yaml文件',
},
'zh_TW': {
'username-label': '用戶名',
'password-label': '密碼',
'delay-label': '延遲(秒)',
'headless-label': '無頭瀏覽',
'nickName-label': '暱稱',
'mode-label': '模式',
'briefLogLength-label': '簡要日誌信息長度',
'onlyWatchMatches-label': '只觀看的聯賽(逗號分隔)',
'disWatchMatches-label': '需忽略的聯賽(逗號分隔)',
'maxStream-label': '同時觀看的最大比賽場次',
'maxRunHours-label': '最大運行小時數',
'language-label': '顯示語言',
'proxy-label': '代理地址',
'connectorDropsUrl-label': 'Webhook掉落提醒鏈接',
'exportDrops-label': '導出掉落詳情文件',
'platForm-label': '系統平臺',
'arm64-label': '啟用對 Linux ARM64 上 Chromium 的支持',
'closeStream-label': '刪除視頻播放器元素以節省流量',
'desktopNotify-label': '啟用桌面通知',
'sleepPeriod-label': '休眠時段(起始小時 - 結束小時)',
'ignoreBroadCast-label': '忽略轉播狀態',
'userDataDir-label': 'Chrome Cookie 文件路徑',
'chromePath-label': 'Chrome.exe 路徑',
'countDrops-label': '監視掉落數量',
'autoSleep-label': '自動休眠模式開關',
'debug-label': '調試模式',
'isDockerized-label': 'Dockerized 模式',
'username-small': 'Riot Games 帳號用戶名',
'password-small': 'Riot Games 帳號密碼',
'delay-small': '每次檢查的時間間隔,單位為秒(預設為 600 秒),每次檢查時間會在你設定的時間間隔的 0.8 到 1.5 倍之間隨機波動。',
'headless-small': '設定為 True 時,程式將在背景運行;否則,將開啟一個瀏覽器視窗(預設為 False)。',
'nickName-small': '添加帳號的暱稱,預設為“username”。',
'mode-small': '模式選擇:“safe”為安全模式,“normal”為正常模式,預設為“safe”。更多詳情請查看 GitHub 頁面。',
'briefLogLength-small': '日誌簡要信息長度,預設為 10。',
'onlyWatchMatches-small': '只觀看的聯賽(逗號分隔)注意:需要小寫',
'disWatchMatches-small': '需忽略的聯賽(逗號分隔)注意:需要小寫',
'maxStream-small': '同時觀看的最大比賽場次,超過該數量的比賽將不會被觀看,預設為 4。',
'maxRunHours-small': '負數表示一直運行;正數表示運行小時數,預設為 -1。',
'language-small': '顯示語言,預設為“en_US”。',
'proxy-small': '代理地址,一般用戶不需要填寫',
'connectorDropsUrl-small': 'webhook連結,用於掉落提醒。支援 Discord、釘釘、飯碗警告、企業微信、飛書,詳細內容請參閱 wiki。',
'exportDrops-small': '是否需要匯出掉落詳情檔案,僅在腳本開啟時才會生成。',
'platForm-small': '作業系統平台,預設為 Windows。如果你想在 Linux 上使用本程式,請在此處更改為 linux',
'arm64-small': '啟用對 Linux ARM64 上 Chromium 的支援,需要 platForm: "linux" 以及將 chromedriver 放置在 "/home/USERNAME/.local/share/undetected_chromedriver/chromedriver",更多資訊請查看 GitHub wiki。',
'closeStream-small': '刪除影片播放器元素以節省流量。',
'desktopNotify-small': '啟用 Windows 桌面通知。',
'sleepPeriod-small': '休眠時段,格式為 起始小時 - 結束小時,預設為空。在休眠時段,所有標籤頁將被關閉,休眠結束後將重新打開。',
'ignoreBroadCast-small': '忽略轉播狀態,如果設定為 True,將忽略轉播狀態',
'userDataDir-small': 'Chrome Cookie 檔案路徑,如果你想使用自己的緩存資訊,請在此處填寫 userDataDir 的路徑。',
'chromePath-small': 'Chrome.exe 路徑,如果你想使用自己的 Chrome.exe,請在此處填寫 Chrome.exe 的路徑。',
'countDrops-small': '是否檢查掉落數量',
'autoSleep-small': '自動休眠模式開關,打開後沒比賽時會自動休眠',
'debug-small': '調試模式,開啟後會在發生錯誤時截圖',
'isDockerized-small': '在 Docker 容器上運行 EsportsHelper,默認為 False。',
'generate-button': '產生並下載 config.yaml 檔案',
},
'es_ES': {
'username-label': 'Nombre de usuario',
'password-label': 'Contraseña',
'delay-label': 'Retraso (segundos)',
'headless-label': 'Navegación sin cabeza',
'nickName-label': 'Apodo',
'mode-label': 'Modo',
'briefLogLength-label': 'Longitud del registro de información breve',
'onlyWatchMatches-label': 'Solo ver partidos (separados por comas)',
'disWatchMatches-label': 'Ignorar partidos (separados por comas)',
'maxStream-label': 'Número máximo de partidos para ver simultáneamente',
'maxRunHours-label': 'Número máximo de horas de ejecución',
'language-label': 'Idioma de la interfaz',
'proxy-label': 'Dirección del proxy',
'connectorDropsUrl-label': 'Enlace de notificación de caída de Webhook',
'exportDrops-label': 'Exportar archivo de detalles de caída',
'platForm-label': 'Plataforma del sistema',
'arm64-label': 'Habilitar soporte para Chromium en Linux ARM64',
'closeStream-label': 'Eliminar elementos del reproductor de video para ahorrar ancho de banda',
'desktopNotify-label': 'Habilitar notificaciones de escritorio',
'sleepPeriod-label': 'Período de sueño (hora de inicio - hora de finalización)',
'ignoreBroadCast-label': 'Ignorar estado de transmisión',
'userDataDir-label': 'Ruta del archivo de cookies de Chrome',
'chromePath-label': 'Ruta de Chrome.exe',
'countDrops-label': 'Número de caídas a monitorear',
'autoSleep-label': 'Interruptor del modo de suspensión automática',
'debug-label': 'Modo de depuración',
'isDockerized-label': 'Modo Dockerizado',
'username-small': 'Nombre de usuario de la cuenta de Riot Games',
'password-small': 'Contraseña de la cuenta de Riot Games',
'delay-small': 'Intervalo de tiempo para cada revisión en segundos (600 segundos por defecto). Cada intervalo de tiempo de revisión fluctuará aleatoriamente entre 0,8 y 1,5 veces el retraso de tiempo que establezcas.',
'headless-small': 'Cuando se establece en Verdadero (True), el programa se ejecutará en segundo plano; de lo contrario, abrirá una ventana de navegador (Falso por defecto).',
'nickName-small': 'Apodo para la cuenta añadida, "nombre de usuario" por defecto.',
'mode-small': 'Selección de modo: "seguro" para el modo Seguro, "normal" para el modo regular, el valor por defecto es "seguro". Consulta la página de GitHub para más detalles.',
'briefLogLength-small': 'Longitud de la información resumida del registro. Por defecto son 10.',
'onlyWatchMatches-small': 'Ligas para observar, separadas por comas (por ejemplo, lcs, lla, lpl). Por favor, nota que los nombres deben estar en minúsculas.',
'disWatchMatches-small': 'Ligas para ignorar, separadas por comas (por ejemplo, lms, cblol). Por favor, nota que los nombres deben estar en minúsculas.',
'language-small': 'Selección de idioma para la interfaz del programa.',
'maxStream-small': 'El número máximo de partidas que se pueden observar al mismo tiempo, más allá de las cuales no se observarán. Por defecto son 4.',
'maxRunHours-small': 'Valor negativo significa que siempre está en funcionamiento; valor positivo es el tiempo de funcionamiento en horas. Por defecto es -1.',
'proxy-small': 'Dirección del proxy, no es necesario para usuarios generales (por ejemplo, "127.0.0.1:7890").',
'connectorDropsUrl-small': 'Enlace del webhook de Discord para las notificaciones de caídas.',
'exportDrops-small': 'Si necesitas o no exportar el archivo de detalles totales de caídas, solo se generará cuando se abra el script.',
'platForm-small': 'Plataforma del sistema operativo. Windows está configurado por defecto. Si deseas utilizar el programa en Linux, por favor cambia el valor aquí.',
'arm64-small': 'Habilitar el soporte para usar Chromium en Linux ARM64, requiere platForm: "linux" y tener el chromedriver en "/home/USERNAME/.local/share/undetected_chromedriver/chromedriver". Más información: https://github.com/Yudaotor/EsportsHelper/wiki/The-Way-Using-Chromium-on-ARM64',
'closeStream-small': 'Opción para eliminar elementos del reproductor de vídeo para ahorrar tráfico (Riesgo).',
'desktopNotify-small': 'Función experimental para habilitar notificaciones de escritorio.',
'sleepPeriod-small': 'Período de hibernación, vacío por defecto, permite múltiples períodos. El formato es Hora de inicio - Hora de finalización. Las pestañas se cerrarán y se reabrirán al finalizar el período de hibernación.',
'ignoreBroadCast-small': 'Opción para ignorar las transmisiones en directo.',
'userDataDir-small': 'Ruta a los archivos de cookies de Chrome.',
'chromePath-small': 'Ubicación de Chrome.exe.',
'countDrops-small': 'Opción para monitorizar el número de caídas, por defecto es Verdadero (True).',
'autoSleep-small': 'Interruptor para el modo de auto-hibernación: hibernando cuando no hay partidas en directo, despertando cuando comienza una partida en directo (Verdadero (True) por defecto).',
'debug-small': 'Modo de depuración, por defecto es Falso (False).',
'isDockerized-small': 'Ejecuta EsportsHelper en un contenedor de Docker, por defecto es False.',
'generate-button': 'Generar y descargar archivo config.yaml',
},
};
var selectedLanguageTexts = textMappings[selectedLanguage];
for (var elementId in selectedLanguageTexts) {
if (selectedLanguageTexts.hasOwnProperty(elementId)) {
var element = document.getElementById(elementId);
if (element) {
element.textContent = selectedLanguageTexts[elementId];
}
}
}
}
function generateYAML() {
let username = document.getElementById('username').value;
let password = document.getElementById('password').value;
// Start the YAML content without leading new lines
let yamlContent = `username: "${username}"\npassword: "${password}"\n`;
// Optional values
let delay = document.getElementById('delay').value;
if (delay) yamlContent += `delay: ${delay}\n`;
let headless = document.getElementById('headless').value;
if (headless !== '') yamlContent += `headless: ${headless}\n`;
let nickName = document.getElementById('nickName').value;
if (nickName) yamlContent += `nickName: "${nickName}"\n`;
let mode = document.getElementById('mode').value;
if (mode !== '') yamlContent += `mode: "${mode}"\n`;
let briefLogLength = document.getElementById('briefLogLength').value;
if (briefLogLength) yamlContent += `briefLogLength: ${briefLogLength}\n`;
let onlyWatchMatches = document.getElementById('onlyWatchMatches').value;
if (onlyWatchMatches) yamlContent += `onlyWatchMatches: ["${onlyWatchMatches.split(',').map((item) => item.trim()).join('","')}"]\n`;
let disWatchMatches = document.getElementById('disWatchMatches').value;
if (disWatchMatches) yamlContent += `disWatchMatches: ["${disWatchMatches.split(',').map((item) => item.trim()).join('","')}"]\n`;
let language = document.getElementById('language').value;
if (language !== '') yamlContent += `language: "${language}"\n`;
let maxStream = document.getElementById('maxStream').value;
if (maxStream) yamlContent += `maxStream: ${maxStream}\n`;
let maxRunHours = document.getElementById('maxRunHours').value;
if (maxRunHours) yamlContent += `maxRunHours: ${maxRunHours}\n`;
let proxy = document.getElementById('proxy').value;
if (proxy) yamlContent += `proxy: "${proxy}"\n`;
let connectorDropsUrl = document.getElementById('connectorDropsUrl').value;
if (connectorDropsUrl) yamlContent += `connectorDropsUrl: "${connectorDropsUrl}"\n`;
let exportDrops = document.getElementById('exportDrops').value;
if (exportDrops !== '') yamlContent += `exportDrops: ${exportDrops}\n`;
let platForm = document.getElementById('platForm').value;
if (platForm) yamlContent += `platForm: "${platForm}"\n`;
let arm64 = document.getElementById('arm64').value;
if (arm64 !== '') yamlContent += `arm64: ${arm64}\n`;
let closeStream = document.getElementById('closeStream').value;
if (closeStream !== '') yamlContent += `closeStream: ${closeStream}\n`;
let desktopNotify = document.getElementById('desktopNotify').value;
if (desktopNotify !== '') yamlContent += `desktopNotify: ${desktopNotify}\n`;
let sleepPeriod = document.getElementById('sleepPeriod').value;
if (sleepPeriod) yamlContent += `sleepPeriod: ["${sleepPeriod.split(',').map((item) => item.trim()).join('","')}"]\n`;
let ignoreBroadCast = document.getElementById('ignoreBroadCast').value;
if (ignoreBroadCast !== '') yamlContent += `ignoreBroadCast: ${ignoreBroadCast}\n`;
let userDataDir = document.getElementById('userDataDir').value;
if (userDataDir) yamlContent += `userDataDir: "${userDataDir}"\n`;
let chromePath = document.getElementById('chromePath').value;
if (chromePath) yamlContent += `chromePath: "${chromePath}"\n`;
let countDrops = document.getElementById('countDrops').value;
if (countDrops !== '') yamlContent += `countDrops: ${countDrops}\n`;
let autoSleep = document.getElementById('autoSleep').value;
if (autoSleep !== '') yamlContent += `autoSleep: ${autoSleep}\n`;
let debug = document.getElementById('debug').value;
if (debug !== '') yamlContent += `debug: ${debug}\n`;
let isDockerized = document.getElementById('isDockerized').value;
if (isDockerized !== '') yamlContent += `isDockerized: ${isDockerized}\n`;
// Create a blob and download
let blob = new Blob([yamlContent], {type: 'text/plain'});
let a = document.createElement('a');
a.href = URL.createObjectURL(blob);
a.download = 'config.yaml';
a.click();
}
</script>
<script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
</body>
</html>