From d50236f78fd118db18c1ae433224f8066171d9c3 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Mon, 29 Jul 2024 21:59:18 -0500 Subject: [PATCH] Save last quality used, clear URL on submission --- README.md | 2 +- static/index.html | 8 +++++++- static/js/main.js | 7 +++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 static/js/main.js diff --git a/README.md b/README.md index 85f2a1f..21b55b8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A web downloader for Youtube videos. It can be found at https://univerter.dev -Currently only supporting Youtube. For old Univerter, which supports a variety of sites, visit https://legacy.univerter.dev. +Currently only supporting Youtube, and not many formats. For old Univerter, which supports a variety of sites, visit https://legacy.univerter.dev. # Installation diff --git a/static/index.html b/static/index.html index b7dd600..29b9c32 100644 --- a/static/index.html +++ b/static/index.html @@ -8,6 +8,13 @@ + + + + @@ -44,7 +51,6 @@ diff --git a/static/js/main.js b/static/js/main.js new file mode 100644 index 0000000..f6ffb79 --- /dev/null +++ b/static/js/main.js @@ -0,0 +1,7 @@ +$(document).ready(() => { + $("#quality").val(Cookies.get("quality") || "720") + $("form").submit(() => { + Cookies.set("quality", $("#quality").val()) + $("#url").val("") + }) +}) \ No newline at end of file