更新 'SrcJyAlist.js'

master
src48597962 2 years ago
parent 1ba1b32373
commit c38b38dc52
  1. 3
      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);

Loading…
Cancel
Save