From a5c5dd36354d497688041dfc4775b160558f5f88 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Tue, 21 Feb 2023 21:02:17 +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 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/SrcJyAlist.js b/SrcJyAlist.js index 0ec9d4e0..08fccbee 100644 --- a/SrcJyAlist.js +++ b/SrcJyAlist.js @@ -79,14 +79,15 @@ function alistHome() { eval("var alistData=" + fetch(alistfile)); let jknum = alistData.drives.length; }catch(e){ - var alistData= {drives:[],config:{}}; + var alistData= {drives:[]}; } + let config = alistData.config || {}; + let fileFilter = config['fileFilter'] || 1; var d = []; d.push({ title: '音视频过滤', - url: $('#noLoading#').lazyRule((alistData, alistfile) => { + url: $('#noLoading#').lazyRule((fileFilter,alistData,alistfile) => { let sm = ""; - let fileFilter = alistData.config['fileFilter'] || 1; if(fileFilter){ alistData.config['fileFilter'] =0; sm = "已关闭音视频文件过滤,将显示全部文件"; @@ -97,8 +98,8 @@ function alistHome() { writeFile(alistfile, JSON.stringify(alistData)); refreshPage(false); return 'toast://'+sm; - }, alistData, alistfile), - img: alistData.config['fileFilter']?"https://lanmeiguojiang.com/tubiao/messy/55.svg":"https://lanmeiguojiang.com/tubiao/messy/56.svg", + }, fileFilter, alistData, alistfile), + img: fileFilter?"https://lanmeiguojiang.com/tubiao/messy/55.svg":"https://lanmeiguojiang.com/tubiao/messy/56.svg", col_type: "icon_2" });