- fixed neighbor quality picking for youtube videos
- webm is now default for youtube downloads for all platforms except for ios
- even more readme changes
- a tiny bit of clean up
- preparing stuff for next major update
This commit is contained in:
wukko
2022-08-06 21:21:48 +06:00
parent 74edaba2b8
commit 2fae43d890
8 changed files with 32 additions and 25 deletions

View File

@@ -1,9 +1,12 @@
let isIOS = navigator.userAgent.toLowerCase().match("iphone os");
let switchers = {
"theme": ["auto", "light", "dark"],
"youtubeFormat": ["mp4", "webm", "audio"],
"youtubeFormat": ["webm", "mp4", "audio"],
"quality": ["max", "hig", "mid", "low"]
}
let exceptions = {
"youtubeFormat": "mp4"
}
function eid(id) {
return document.getElementById(id)
@@ -98,9 +101,11 @@ function changeSwitcher(li, b, u) {
}
if (li == "theme") detectColorScheme();
} else {
localStorage.setItem(li, switchers[li][0]);
let pref = switchers[li][0];
if (isIOS && exceptions[li]) pref = exceptions[li];
localStorage.setItem(li, pref);
for (i in switchers[li]) {
(switchers[li][i] == switchers[li][0]) ? enable(`${li}-${switchers[li][0]}`) : disable(`${li}-${switchers[li][i]}`)
(switchers[li][i] == pref) ? enable(`${li}-${pref}`) : disable(`${li}-${switchers[li][i]}`)
}
}
}