From b01faebab66a46375b7f10a12c59f8af9d67bdf6 Mon Sep 17 00:00:00 2001
From: src48597962 <48597962@qq.com>
Date: Wed, 15 Feb 2023 17:53:24 +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 | 55 +++++++++++++++++++++++++++++----------------------
1 file changed, 31 insertions(+), 24 deletions(-)
diff --git a/SrcJyAlist.js b/SrcJyAlist.js
index 72b4b1fe..1666744f 100644
--- a/SrcJyAlist.js
+++ b/SrcJyAlist.js
@@ -1,29 +1,31 @@
//本代码仅用于个人学习,请勿用于其他作用,下载后请24小时内删除,代码虽然是公开学习的,但请尊重作者,应留下说明
-var Alistfile = "hiker://files/rules/Src/Juying/Alist.json";
-var AlistData = fetch(Alistfile);
-if (AlistData != "") {
- eval("var datalist=" + AlistData + ";");
-} else {
- var datalist = [
- {
- "name": "小雅",
- "server": "http://alist.xiaoya.pro"
- },
- {
- "name": "帅鹏",
- "server": "https://hi.shuaipeng.wang"
- },{
- "name": "触光",
- "server": "https://pan.ichuguang.com"
- },{
- "name": "七米蓝",
- "server": "https://al.chirmyram.com"
- },{
- "name": "神族九帝",
- "server": "https://alist.shenzjd.com"
- }
- ];
+let alistfile = "hiker://files/rules/Src/Juying/Alist.json";
+try{
+ eval("var alistData=" + fetch(alistfile));
+ var datalist = alistData.drives;
+}catch(e){
+ var datalist = [];
}
+datalist = datalist || [
+ {
+ "name": "小雅",
+ "server": "http://alist.xiaoya.pro"
+ },
+ {
+ "name": "帅鹏",
+ "server": "https://hi.shuaipeng.wang"
+ },{
+ "name": "触光",
+ "server": "https://pan.ichuguang.com"
+ },{
+ "name": "七米蓝",
+ "server": "https://al.chirmyram.com"
+ },{
+ "name": "神族九帝",
+ "server": "https://alist.shenzjd.com"
+ }
+];
+
function gethtml(api,path,password) {
try{
path = path || "";
@@ -48,6 +50,11 @@ function getlist(data,isdir) {
function alisthome() {
let alistapi = storage0.getMyVar('Alistapi',{});
let d = [];
+ d.push({
+ title: '⚙管理设置',
+ url: "",
+ col_type: 'scroll_button'
+ });
datalist.forEach(item => {
d.push({
title: alistapi.server==item.server?`““””`+item.name+``:item.name,