UI and UX enhancements

pull/191/head
Andrew 2 years ago
parent 3f4c35aad0
commit 672bd5c954

@ -338,12 +338,12 @@ body {
z-index: 1; z-index: 1;
left: 0; left: 0;
right: 0; right: 0;
margin: auto auto 20px auto; margin: auto;
top: 20%; top: 16%;
background-color: var(--box-main); background-color: var(--box-main);
border-radius: 10px; border-radius: 10px;
width: 80%; width: 80%;
padding: 10px 10px 20px 10px; padding: 10px 10px 15px 10px;
color: var(--text); color: var(--text);
} }
@ -399,7 +399,7 @@ body {
font-size: large; font-size: large;
margin: 8px; margin: 8px;
outline: none; outline: none;
max-width: 100%; max-width: min(400px, 100%);
} }
#videoFormatSelect, #audioFormatSelect, #audioForVideoFormatSelect { #videoFormatSelect, #audioFormatSelect, #audioForVideoFormatSelect {
@ -580,6 +580,10 @@ button {
margin-top: 0; margin-top: 0;
} }
h2{
margin: 12px;
}
/* Scrollbar */ /* Scrollbar */
body::-webkit-scrollbar { body::-webkit-scrollbar {

@ -487,13 +487,14 @@ async function getInfo(url) {
// For videos // For videos
if ( if (
format.video_ext !== "none" && (format.video_ext !== "none" &&
format.audio_ext === "none" && format.audio_ext === "none" &&
!( !(
format.video_ext === "mp4" && format.video_ext === "mp4" &&
format.vcodec && format.vcodec &&
format.vcodec.split(".")[0] === "vp09" format.vcodec.split(".")[0] === "vp09"
) ))
&& (!showMoreFormats ? format.video_ext !== "webm" : true)
) { ) {
if (size !== i18n.__("Unknown size")) { if (size !== i18n.__("Unknown size")) {
size = (Number(size) + 0 || Number(audioSize)).toFixed( size = (Number(size) + 0 || Number(audioSize)).toFixed(
@ -565,6 +566,10 @@ async function getInfo(url) {
format.audio_ext !== "none" || format.audio_ext !== "none" ||
(format.acodec !== "none" && format.video_ext === "none") (format.acodec !== "none" && format.video_ext === "none")
) { ) {
if (!showMoreFormats && format.audio_ext === "webm") {
continue;
}
size = size =
size !== i18n.__("Unknown size") size !== i18n.__("Unknown size")
? size + " MB" ? size + " MB"
@ -611,6 +616,7 @@ async function getInfo(url) {
" | " + " | " +
size + size +
"</option>"; "</option>";
getId("audioFormatSelect").innerHTML += element; getId("audioFormatSelect").innerHTML += element;
getId("audioForVideoFormatSelect").innerHTML += element; getId("audioForVideoFormatSelect").innerHTML += element;

Loading…
Cancel
Save