2024-07-31 02:54:26 -05:00
|
|
|
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)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-07-29 21:59:18 -05:00
|
|
|
$(document).ready(() => {
|
2024-07-31 02:54:26 -05:00
|
|
|
updateOptions()
|
|
|
|
$("#format").on("change", updateOptions)
|
|
|
|
|
2024-07-29 21:59:18 -05:00
|
|
|
$("#quality").val(Cookies.get("quality") || "720")
|
2024-07-31 02:54:26 -05:00
|
|
|
$("#trim").prop("checked", Cookies.get("trim") == "true" || false)
|
2024-11-06 19:34:05 -06:00
|
|
|
$("#playInBrowser").prop("checked", Cookies.get("playInBrowser") == "true" || false)
|
2024-07-29 21:59:18 -05:00
|
|
|
$("form").submit(() => {
|
|
|
|
Cookies.set("quality", $("#quality").val())
|
2024-07-31 02:54:26 -05:00
|
|
|
Cookies.set("trim", $("#trim").prop("checked"))
|
2024-11-06 19:34:05 -06:00
|
|
|
Cookies.set("playInBrowser", $("#playInBrowser").prop("checked"))
|
2024-07-29 21:59:18 -05:00
|
|
|
})
|
|
|
|
})
|