From ec853b6429bb2a87ab30da9f580daf1a7e72c085 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Sun, 6 Aug 2023 22:47:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJuSet.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJuSet.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SrcJuSet.js b/SrcJuSet.js index c6a2e667..cbfdabec 100644 --- a/SrcJuSet.js +++ b/SrcJuSet.js @@ -635,7 +635,11 @@ function JYimport(input) { let content = parsePaste(parseurl); datalist2 = JSON.parse(aesDecode('SrcJu', content)); }else if(/^\//.test(parseurl)){ - datalist2 = JSON.parse(aesDecode('SrcJu', fetch('file://'+parseurl))); + if(parseurl.endsWith('.txt')){ + datalist2 = JSON.parse(aesDecode('SrcJu', fetch('file://'+parseurl))); + }else{ + return "toast://请选择聚阅分享txt文件" + } }else{ datalist2 = JSON.parse(parseurl); } @@ -661,6 +665,7 @@ function JYimport(input) { return "toast://非法口令"; } } catch (e) { + hideLoading(); log('√口令解析失败>'+e.message); return "toast://口令有误"; }