Shorten quality names

This commit is contained in:
the1812 2018-12-07 20:47:24 +08:00
parent 330ebec078
commit 0d4c29581f
6 changed files with 36 additions and 35 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
(()=>{return(n,i)=>{SpinQuery.any(()=>$(".gui-settings-dropdown:has(input[key=defaultVideoQuality])"),n=>{const i=n.find("ul");const t=n.find("input");["高清 1080P60","高清 720P60","高清 1080P+","高清 720P+","高清 1080P","高清 720P","清晰 480P","流畅 360P","自动"].forEach(n=>{$(`<li>${n}</li>`).appendTo(i).on("click",()=>{t.val(n).trigger("input").change()})})})}})();
(()=>{return(n,i)=>{(async()=>{const n=await SpinQuery.any(()=>$(".gui-settings-dropdown:has(input[key=defaultVideoQuality])"));const i=n.find("ul");const t=n.find("input");["1080P60","720P60","1080P+","720P+","1080P","720P","480P","360P","自动"].forEach(n=>{$(`<li>${n}</li>`).appendTo(i).on("click",()=>{t.val(n).trigger("input").change()})})})()}})();

File diff suppressed because one or more lines are too long

View File

@ -67,14 +67,14 @@
defaultVideoQuality: text =>
{
if ([
"高清 1080P60",
"高清 720P60",
"高清 1080P+",
"高清 720P+",
"高清 1080P",
"高清 720P",
"清晰 480P",
"流畅 360P",
"1080P60",
"720P60",
"1080P+",
"720P+",
"1080P",
"720P",
"480P",
"360P",
"自动",
].indexOf(text) !== -1)
{

View File

@ -2,21 +2,21 @@
{
return (settings, resources) =>
{
SpinQuery.any(
() => $(".gui-settings-dropdown:has(input[key=defaultVideoQuality])"),
dropdown =>
(async () =>
{
const dropdown = await SpinQuery.any(
() => $(".gui-settings-dropdown:has(input[key=defaultVideoQuality])"));
const list = dropdown.find("ul");
const input = dropdown.find("input");
[
"高清 1080P60",
"高清 720P60",
"高清 1080P+",
"高清 720P+",
"高清 1080P",
"高清 720P",
"清晰 480P",
"流畅 360P",
"1080P60",
"720P60",
"1080P+",
"720P+",
"1080P",
"720P",
"480P",
"360P",
"自动",
].forEach(value =>
{
@ -26,7 +26,8 @@
input.val(value).trigger("input").change();
});
});
}
);
// const qualityMenu = await SpinQuery.any()
})();
};
})();