From c38b38dc52b84320c36511931a5b700b6a9cc787 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Fri, 17 Feb 2023 15:29:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJyAlist.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJyAlist.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SrcJyAlist.js b/SrcJyAlist.js index 7338c741..df6c9ebd 100644 --- a/SrcJyAlist.js +++ b/SrcJyAlist.js @@ -44,13 +44,12 @@ function getlist(data,isdir) { return isdir ? item.is_dir : fileFilter?contain.test(item.name):item.is_dir==0; }) list = list.sort((a,b)=>{ - return b.name.replace(/[^\d]/g, " ") - a.name.replace(/[^\d]/g, " "); let oDate1 = new Date(a.modified); let oDate2 = new Date(b.modified); if(a.modified!=b.modified){ return oDate2.getTime() < oDate1.getTime() }else{ - return b.name - a.name; + return a.name.replace(/[^\d]/g, " ") - b.name.replace(/[^\d]/g, " "); } }); log(list);