From 744f1e590c84bd91e5e61328d61c95d80ca029fd Mon Sep 17 00:00:00 2001 From: kuangthree Date: Sat, 27 Jan 2024 12:55:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=89=A9=E5=B1=95=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=B9=E9=A2=84=E7=95=99=E6=8E=92=E5=BA=8F=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/ui/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/noname/ui/index.js b/noname/ui/index.js index e043027f3..5a71a9e3f 100644 --- a/noname/ui/index.js +++ b/noname/ui/index.js @@ -3703,7 +3703,13 @@ class Create extends Uninstantable { // if(!get.config('menu_loadondemand')) node._initLink(); return node; }; - for (var i in lib.extensionMenu) { + let extensionsInMenu = Object.keys(lib.extensionMenu); + if(lib.config.extensionSort && Array.isArray(lib.config.extensionSort)){ + extensionsInMenu.sort((a,b)=>{ + return lib.config.extensionSort.indexOf(a) - lib.config.extensionSort.indexOf(b); + }); + } + for (var i of extensionsInMenu) { if (lib.config.all.stockextension.includes(i) && !lib.config.all.plays.includes(i)) continue; if (lib.config.hiddenPlayPack.includes(i)) continue; createModeConfig(i, start.firstChild); From d726c19e3897939975c41de954e8f2d31fdaa6d8 Mon Sep 17 00:00:00 2001 From: kuangthree Date: Sat, 27 Jan 2024 12:56:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=B0=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/ui/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noname/ui/index.js b/noname/ui/index.js index 5a71a9e3f..87fb96956 100644 --- a/noname/ui/index.js +++ b/noname/ui/index.js @@ -3709,7 +3709,7 @@ class Create extends Uninstantable { return lib.config.extensionSort.indexOf(a) - lib.config.extensionSort.indexOf(b); }); } - for (var i of extensionsInMenu) { + for (let i of extensionsInMenu) { if (lib.config.all.stockextension.includes(i) && !lib.config.all.plays.includes(i)) continue; if (lib.config.hiddenPlayPack.includes(i)) continue; createModeConfig(i, start.firstChild);