更新 'SrcJmSet.js'

Ju
src48597962 2 years ago
parent 7fd2d8663b
commit a5c69006f9
  1. 26
      SrcJmSet.js

@ -39,13 +39,15 @@ function SRCSet() {
col_type: 'input', col_type: 'input',
desc: "主页数据源, 可以留空", desc: "主页数据源, 可以留空",
extra: { extra: {
defaultValue: getMyVar('manhuaparse')?getMyVar('manhuaparse'):"", defaultValue: getMyVar('manhuaparse')?JSON.stringify(JSON.parse(getMyVar('manhuaparse')), null, "\t"):"",
titleVisible: false, titleVisible: false,
type: "textarea", type: "textarea",
highlight: true, highlight: true,
height: 5, height: 5,
onChange: $.toString(() => { onChange: $.toString(() => {
putMyVar('manhuaparse',input); if(/{|}/.test(input)){
putMyVar("manhuaparse",JSON.stringify(JSON.parse(input)))
}
}) })
} }
}); });
@ -54,13 +56,15 @@ function SRCSet() {
col_type: 'input', col_type: 'input',
desc: "搜索数据源, 可以留空", desc: "搜索数据源, 可以留空",
extra: { extra: {
defaultValue: getMyVar('manhuaerparse')?getMyVar('manhuaerparse'):"", defaultValue: getMyVar('manhuaerparse')?JSON.stringify(JSON.parse(getMyVar('manhuaerparse')), null, "\t"):"",
titleVisible: false, titleVisible: false,
type: "textarea", type: "textarea",
highlight: true, highlight: true,
height: 5, height: 5,
onChange: $.toString(() => { onChange: $.toString(() => {
putMyVar('manhuaerparse',input); if(/{|}/.test(input)){
putMyVar("manhuaerparse",JSON.stringify(JSON.parse(input)))
}
}) })
} }
}); });
@ -116,6 +120,7 @@ function SRCSet() {
d.push({ d.push({
title: '增加', title: '增加',
url: $('hiker://empty#noRecordHistory##noHistory#').rule((filepath,manhuaapi) => { url: $('hiker://empty#noRecordHistory##noHistory#').rule((filepath,manhuaapi) => {
setPageTitle('增加 | 聚漫接口');
manhuaapi(filepath); manhuaapi(filepath);
},filepath,manhuaapi), },filepath,manhuaapi),
img: "https://lanmeiguojiang.com/tubiao/more/25.png", img: "https://lanmeiguojiang.com/tubiao/more/25.png",
@ -123,7 +128,7 @@ function SRCSet() {
}); });
d.push({ d.push({
title: '导入', title: '导入',
url: $("", "云盘分享口令的云剪贴板").input((filepath) => { url: $("", "聚漫分享口令的云剪贴板").input((filepath) => {
try { try {
let inputname = input.split('¥')[0]; let inputname = input.split('¥')[0];
if (inputname == "聚漫接口") { if (inputname == "聚漫接口") {
@ -153,11 +158,11 @@ function SRCSet() {
refreshPage(false); refreshPage(false);
return "toast://合计" + datalist2.length + "个,导入" + num + "个"; return "toast://合计" + datalist2.length + "个,导入" + num + "个";
} else { } else {
return "toast://聚影√:非云盘口令"; return "toast://聚影√:非聚漫口令";
} }
} catch (e) { } catch (e) {
log(e.message); log(e.message);
return "toast://聚√:口令有误"; return "toast://聚√:口令有误";
} }
}, filepath), }, filepath),
img: "https://lanmeiguojiang.com/tubiao/more/43.png", img: "https://lanmeiguojiang.com/tubiao/more/43.png",
@ -170,7 +175,7 @@ function SRCSet() {
if (pasteurl) { if (pasteurl) {
let code = '聚漫接口¥' + aesEncode('Juman', pasteurl) + '¥共' + datalist.length + '条'; let code = '聚漫接口¥' + aesEncode('Juman', pasteurl) + '¥共' + datalist.length + '条';
copy(code); copy(code);
return "toast://(全部)云盘分享口令已生成"; return "toast://(全部)聚漫分享口令已生成";
} else { } else {
return "toast://分享失败,剪粘板或网络异常"; return "toast://分享失败,剪粘板或网络异常";
} }
@ -184,7 +189,7 @@ function SRCSet() {
datalist.forEach(item => { datalist.forEach(item => {
d.push({ d.push({
title: "💽 " + item.name + " (" + (item.erparse?"二解接口":"一解接口") + ")", title: "🎃 " + item.name + (item.parse?"(主页源)":"") + + (item.erparse?"(搜索源)":""),
url: $(["分享", "编辑", "删除"], 1).select((filepath,manhuaapi,data) => { url: $(["分享", "编辑", "删除"], 1).select((filepath,manhuaapi,data) => {
if(input == "分享"){ if(input == "分享"){
showLoading('分享上传中,请稍后...'); showLoading('分享上传中,请稍后...');
@ -195,12 +200,13 @@ function SRCSet() {
if(pasteurl){ if(pasteurl){
let code = '聚漫接口¥'+aesEncode('Juman', pasteurl)+'¥'+data.name; let code = '聚漫接口¥'+aesEncode('Juman', pasteurl)+'¥'+data.name;
copy(code); copy(code);
return "toast://(单个)云盘分享口令已生成"; return "toast://(单个)聚漫分享口令已生成";
}else{ }else{
return "toast://分享失败,剪粘板或网络异常"; return "toast://分享失败,剪粘板或网络异常";
} }
}else if(input == "编辑"){ }else if(input == "编辑"){
return $('hiker://empty#noRecordHistory##noHistory#').rule((filepath,manhuaapi,data) => { return $('hiker://empty#noRecordHistory##noHistory#').rule((filepath,manhuaapi,data) => {
setPageTitle('编辑 | 聚漫接口');
manhuaapi(filepath,data); manhuaapi(filepath,data);
},filepath,manhuaapi,data) },filepath,manhuaapi,data)
} else if (input == "删除") { } else if (input == "删除") {

Loading…
Cancel
Save