From d2f5a85ae5abfe09953d062d641c03bddc0e85fd Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Wed, 22 Feb 2023 21:21:37 +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 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SrcJyAlist.js b/SrcJyAlist.js index 8a340256..49efbc33 100644 --- a/SrcJyAlist.js +++ b/SrcJyAlist.js @@ -110,9 +110,12 @@ function alistHome() { d.push({ title: '增加', url: $("","alist链接地址\n如:https://alist.abc.com").input((alistfile) => { - if(!input.startsWith('http') || input.endsWith('/')){ + if(!input.startsWith('http')){ return 'toast://链接有误'; } + if(input.endsWith('/')){ + input = input.slice(0,input.length-1); + } showLoading('正在较验有效性'); let apiurl = input + "/api/public/settings"; try{ @@ -142,7 +145,7 @@ function alistHome() { } }, alistfile, input); }else{ - return 'toast://仅支持alist v3版本'; + return 'toast://不支持版本'+getapi.data.version+',仅支持v3以上版本'; } }catch(e){ hideLoading(); @@ -417,7 +420,7 @@ function alistList(alistapi,dirname){ let filelist = getlist(json.data.content||[],0); addItemBefore(listid, arrayAdd(filelist,0,alistapi)); if(dirlist.length==0&&filelist.length==0){ - addItemBefore('listid', { + addItemBefore(listid, { title: "列表为空", url: "hiker://empty", col_type: "text_center_1"