24 lines
No EOL
748 B
JavaScript
24 lines
No EOL
748 B
JavaScript
var audioFormats = ["mp3"]
|
|
|
|
function updateOptions() {
|
|
var format = $("#format").val()
|
|
if (audioFormats.includes(format)) {
|
|
$("#audioOnly > input").attr("disabled", false)
|
|
$("#videoAndAudio > input").attr("disabled", true)
|
|
} else {
|
|
$("#audioOnly > input").attr("disabled", true)
|
|
$("#videoAndAudio > input").attr("disabled", false)
|
|
}
|
|
}
|
|
|
|
$(document).ready(() => {
|
|
updateOptions()
|
|
$("#format").on("change", updateOptions)
|
|
|
|
$("#quality").val(Cookies.get("quality") || "720")
|
|
$("#trim").prop("checked", Cookies.get("trim") == "true" || false)
|
|
$("form").submit(() => {
|
|
Cookies.set("quality", $("#quality").val())
|
|
Cookies.set("trim", $("#trim").prop("checked"))
|
|
})
|
|
}) |