From a5c69006f9a9ae973da3227a1b3dc1418149d279 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Fri, 31 Mar 2023 17:56:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJmSet.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJmSet.js | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/SrcJmSet.js b/SrcJmSet.js index 3497863e..a1c76c7b 100644 --- a/SrcJmSet.js +++ b/SrcJmSet.js @@ -39,13 +39,15 @@ function SRCSet() { col_type: 'input', desc: "主页数据源, 可以留空", extra: { - defaultValue: getMyVar('manhuaparse')?getMyVar('manhuaparse'):"", + defaultValue: getMyVar('manhuaparse')?JSON.stringify(JSON.parse(getMyVar('manhuaparse')), null, "\t"):"", titleVisible: false, type: "textarea", highlight: true, height: 5, onChange: $.toString(() => { - putMyVar('manhuaparse',input); + if(/{|}/.test(input)){ + putMyVar("manhuaparse",JSON.stringify(JSON.parse(input))) + } }) } }); @@ -54,13 +56,15 @@ function SRCSet() { col_type: 'input', desc: "搜索数据源, 可以留空", extra: { - defaultValue: getMyVar('manhuaerparse')?getMyVar('manhuaerparse'):"", + defaultValue: getMyVar('manhuaerparse')?JSON.stringify(JSON.parse(getMyVar('manhuaerparse')), null, "\t"):"", titleVisible: false, type: "textarea", highlight: true, height: 5, onChange: $.toString(() => { - putMyVar('manhuaerparse',input); + if(/{|}/.test(input)){ + putMyVar("manhuaerparse",JSON.stringify(JSON.parse(input))) + } }) } }); @@ -116,6 +120,7 @@ function SRCSet() { d.push({ title: '增加', url: $('hiker://empty#noRecordHistory##noHistory#').rule((filepath,manhuaapi) => { + setPageTitle('增加 | 聚漫接口'); manhuaapi(filepath); },filepath,manhuaapi), img: "https://lanmeiguojiang.com/tubiao/more/25.png", @@ -123,7 +128,7 @@ function SRCSet() { }); d.push({ title: '导入', - url: $("", "云盘分享口令的云剪贴板").input((filepath) => { + url: $("", "聚漫分享口令的云剪贴板").input((filepath) => { try { let inputname = input.split('¥')[0]; if (inputname == "聚漫接口") { @@ -153,11 +158,11 @@ function SRCSet() { refreshPage(false); return "toast://合计" + datalist2.length + "个,导入" + num + "个"; } else { - return "toast://聚影√:非云盘口令"; + return "toast://聚影√:非聚漫口令"; } } catch (e) { log(e.message); - return "toast://聚影√:口令有误"; + return "toast://聚漫√:口令有误"; } }, filepath), img: "https://lanmeiguojiang.com/tubiao/more/43.png", @@ -170,7 +175,7 @@ function SRCSet() { if (pasteurl) { let code = '聚漫接口¥' + aesEncode('Juman', pasteurl) + '¥共' + datalist.length + '条'; copy(code); - return "toast://(全部)云盘分享口令已生成"; + return "toast://(全部)聚漫分享口令已生成"; } else { return "toast://分享失败,剪粘板或网络异常"; } @@ -184,7 +189,7 @@ function SRCSet() { datalist.forEach(item => { d.push({ - title: "💽 " + item.name + " (" + (item.erparse?"二解接口":"一解接口") + ")", + title: "🎃 " + item.name + (item.parse?"(主页源)":"") + + (item.erparse?"(搜索源)":""), url: $(["分享", "编辑", "删除"], 1).select((filepath,manhuaapi,data) => { if(input == "分享"){ showLoading('分享上传中,请稍后...'); @@ -195,12 +200,13 @@ function SRCSet() { if(pasteurl){ let code = '聚漫接口¥'+aesEncode('Juman', pasteurl)+'¥'+data.name; copy(code); - return "toast://(单个)云盘分享口令已生成"; + return "toast://(单个)聚漫分享口令已生成"; }else{ return "toast://分享失败,剪粘板或网络异常"; } }else if(input == "编辑"){ return $('hiker://empty#noRecordHistory##noHistory#').rule((filepath,manhuaapi,data) => { + setPageTitle('编辑 | 聚漫接口'); manhuaapi(filepath,data); },filepath,manhuaapi,data) } else if (input == "删除") {