mirror of
https://github.com/NohamR/N_m3u8DL-RE_Command_Generator.git
synced 2025-05-24 14:31:57 +00:00
Merge pull request #4 from RikaCelery/fix-default-value
修复:带默认值的复选框表现和预期不符
This commit is contained in:
commit
cd80fcd6ce
@ -225,7 +225,8 @@
|
|||||||
<div class="description">跳过下载</div>
|
<div class="description">跳过下载</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<input type="checkbox" name="check-segments-count" id="check-segments-count" checked />
|
<input type="checkbox" name="check-segments-count" id="check-segments-count" checked
|
||||||
|
default="true" />
|
||||||
<label for="check-segments-count">check-segments-count</label>
|
<label for="check-segments-count">check-segments-count</label>
|
||||||
<div class="description">检测实际下载的分片数量和预期数量是否匹配 </div>
|
<div class="description">检测实际下载的分片数量和预期数量是否匹配 </div>
|
||||||
</div>
|
</div>
|
||||||
@ -235,7 +236,7 @@
|
|||||||
<div class="description">二进制合并</div>
|
<div class="description">二进制合并</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<input type="checkbox" name="del-after-done" id="del-after-done" checked />
|
<input type="checkbox" name="del-after-done" id="del-after-done" checked default="true" />
|
||||||
<label for="del-after-done">del-after-done</label>
|
<label for="del-after-done">del-after-done</label>
|
||||||
<div class="description">完成后删除临时文件 </div>
|
<div class="description">完成后删除临时文件 </div>
|
||||||
</div>
|
</div>
|
||||||
@ -265,7 +266,8 @@
|
|||||||
<div class="description">只选取字幕轨道</div>
|
<div class="description">只选取字幕轨道</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<input type="checkbox" name="auto-subtitle-fix" id="auto-subtitle-fix" checked />
|
<input type="checkbox" name="auto-subtitle-fix" id="auto-subtitle-fix" checked
|
||||||
|
default="true" />
|
||||||
<label for="auto-subtitle-fix">auto-subtitle-fix</label>
|
<label for="auto-subtitle-fix">auto-subtitle-fix</label>
|
||||||
<div class="description">自动修正字幕 </div>
|
<div class="description">自动修正字幕 </div>
|
||||||
</div>
|
</div>
|
||||||
@ -280,7 +282,8 @@
|
|||||||
<div class="description">实时解密MP4分片</div>
|
<div class="description">实时解密MP4分片</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<input type="checkbox" name="use-system-proxy" id="use-system-proxy" checked />
|
<input type="checkbox" name="use-system-proxy" id="use-system-proxy" checked
|
||||||
|
default="true" />
|
||||||
<label for="use-system-proxy">use-system-proxy</label>
|
<label for="use-system-proxy">use-system-proxy</label>
|
||||||
<div class="description">使用系统默认代理 </div>
|
<div class="description">使用系统默认代理 </div>
|
||||||
</div>
|
</div>
|
||||||
@ -295,7 +298,8 @@
|
|||||||
<div class="description">录制直播时实时合并</div>
|
<div class="description">录制直播时实时合并</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<input type="checkbox" name="live-keep-segments" id="live-keep-segments" checked />
|
<input type="checkbox" name="live-keep-segments" id="live-keep-segments" checked
|
||||||
|
default="true" />
|
||||||
<label for="live-keep-segments">live-keep-segments</label>
|
<label for="live-keep-segments">live-keep-segments</label>
|
||||||
<div class="description">录制直播并开启实时合并时依然保留分片 </div>
|
<div class="description">录制直播并开启实时合并时依然保留分片 </div>
|
||||||
</div>
|
</div>
|
||||||
@ -332,8 +336,10 @@
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'checkbox':
|
case 'checkbox':
|
||||||
if (element.checked) {
|
|
||||||
|
if (element.checked != Boolean(element.getAttribute('default'))) {
|
||||||
finalArgs.push('--' + element.id)
|
finalArgs.push('--' + element.id)
|
||||||
|
finalArgs.push(String(element.checked))
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -355,19 +361,23 @@
|
|||||||
console.log(element.type + ' ' + element.id + ' ' + opt.value)
|
console.log(element.type + ' ' + element.id + ' ' + opt.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
document.getElementById('output').textContent='.\\N_m3u8DL-RE.exe '+finalArgs.join(" ")
|
document.getElementById('output').textContent = './N_m3u8DL-RE.exe ' + finalArgs.join(" ")
|
||||||
console.log(finalArgs.join(" "))
|
console.log(finalArgs.join(" "))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setInterval(() => generate('generator_body'), 100)
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');
|
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--backgrond-color-light: rgb(130, 106, 251);
|
--backgrond-color-light: rgb(130, 106, 251);
|
||||||
--backgrond-color-dark: rgb(16, 13, 29);
|
--backgrond-color-dark: rgb(16, 13, 29);
|
||||||
--backgrond-color: var(--backgrond-color-dark);
|
--backgrond-color: var(--backgrond-color-dark);
|
||||||
|
|
||||||
--accent-color-light: rgb(130, 106, 251);
|
--accent-color-light: rgb(130, 106, 251);
|
||||||
--accent-color-dark:rgb(130, 106, 251);;
|
--accent-color-dark: rgb(130, 106, 251);
|
||||||
|
;
|
||||||
--accent-color: var(--accent-color-dark);
|
--accent-color: var(--accent-color-dark);
|
||||||
|
|
||||||
--backgrond-color-hover-light: rgb(81, 57, 202);
|
--backgrond-color-hover-light: rgb(81, 57, 202);
|
||||||
@ -403,6 +413,7 @@
|
|||||||
--border-color: var(--border-color-dark);
|
--border-color: var(--border-color-dark);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@ -411,6 +422,7 @@
|
|||||||
transition: all 0.2s ease-in-out;
|
transition: all 0.2s ease-in-out;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -435,6 +447,7 @@ body {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#output {
|
#output {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
color: var(--main-text-color);
|
color: var(--main-text-color);
|
||||||
@ -445,6 +458,7 @@ body {
|
|||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form :where(input, select) {
|
.form :where(input, select) {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
@ -588,12 +602,15 @@ body {
|
|||||||
.form input {
|
.form input {
|
||||||
color: var(--main-text-color);
|
color: var(--main-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.form input:focus {
|
.form input:focus {
|
||||||
background-color: var(--input-color-hover);
|
background-color: var(--input-color-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.form input:invalid:not(input:focus) {
|
.form input:invalid:not(input:focus) {
|
||||||
outline: 2px solid red;
|
outline: 2px solid red;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 1000px) {
|
@media screen and (max-width: 1000px) {
|
||||||
|
|
||||||
.form .check>div {
|
.form .check>div {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user