|
|
@ -10,23 +10,25 @@ function SRCSet() { |
|
|
|
var Juconfig= {}; |
|
|
|
var Juconfig= {}; |
|
|
|
} |
|
|
|
} |
|
|
|
let yijisource = Juconfig['yijisource'] || ""; |
|
|
|
let yijisource = Juconfig['yijisource'] || ""; |
|
|
|
|
|
|
|
|
|
|
|
let filepath = "hiker://files/rules/Src/Ju/jiekou.json"; |
|
|
|
let filepath = "hiker://files/rules/Src/Ju/jiekou.json"; |
|
|
|
let sourcedata = fetch(filepath); |
|
|
|
let sourcedata = fetch(filepath); |
|
|
|
if(sourcedata != ""){ |
|
|
|
if(sourcedata != ""){ |
|
|
|
eval("var datalist=" + sourcedata+ ";"); |
|
|
|
try{ |
|
|
|
|
|
|
|
eval("var datalist=" + sourcedata+ ";"); |
|
|
|
|
|
|
|
}catch(e){ |
|
|
|
|
|
|
|
var datalist = []; |
|
|
|
|
|
|
|
} |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
var datalist = []; |
|
|
|
var datalist = []; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let yidatalist = datalist.filter(it=>{ |
|
|
|
let yidatalist = datalist.filter(it=>{ |
|
|
|
return it.parse; |
|
|
|
return it.parse; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
let d = []; |
|
|
|
|
|
|
|
let sourcenames = yidatalist.map(it=>{ |
|
|
|
let sourcenames = yidatalist.map(it=>{ |
|
|
|
return it.name; |
|
|
|
return it.name; |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let d = []; |
|
|
|
d.push({ |
|
|
|
d.push({ |
|
|
|
title: yijisource?yijisource:'设置主页源', |
|
|
|
title: yijisource?yijisource:'设置主页源', |
|
|
|
url: $(sourcenames,2).select((cfgfile,Juconfig) => { |
|
|
|
url: $(sourcenames,2).select((cfgfile,Juconfig) => { |
|
|
@ -40,13 +42,15 @@ function SRCSet() { |
|
|
|
img: "https://lanmeiguojiang.com/tubiao/messy/13.svg", |
|
|
|
img: "https://lanmeiguojiang.com/tubiao/messy/13.svg", |
|
|
|
col_type: "icon_2" |
|
|
|
col_type: "icon_2" |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let runType = ["漫画", "阅读"]; |
|
|
|
d.push({ |
|
|
|
d.push({ |
|
|
|
title: Juconfig['ImportType']=="Coverage"?'导入:覆盖':'导入:跳过', |
|
|
|
title: (Juconfig["runType"]||runType[0]) + "模式", |
|
|
|
url: $(["覆盖", "跳过"],2).select((cfgfile,Juconfig) => { |
|
|
|
url: $(runType,2,"切换运行模式").select((cfgfile,Juconfig) => { |
|
|
|
Juconfig["ImportType"] = input=="覆盖"?"Coverage":"Skip"; |
|
|
|
Juconfig["runType"] = input; |
|
|
|
writeFile(cfgfile, JSON.stringify(Juconfig)); |
|
|
|
writeFile(cfgfile, JSON.stringify(Juconfig)); |
|
|
|
refreshPage(false); |
|
|
|
refreshPage(false); |
|
|
|
return 'toast://导入模式已设置为:' + input; |
|
|
|
return 'toast://运行模式已设置为:' + input; |
|
|
|
}, cfgfile, Juconfig), |
|
|
|
}, cfgfile, Juconfig), |
|
|
|
img: "https://lanmeiguojiang.com/tubiao/messy/84.svg", |
|
|
|
img: "https://lanmeiguojiang.com/tubiao/messy/84.svg", |
|
|
|
col_type: "icon_2" |
|
|
|
col_type: "icon_2" |
|
|
@ -110,7 +114,20 @@ function SRCSet() { |
|
|
|
} |
|
|
|
} |
|
|
|
}, filepath, Juconfig['ImportType']), |
|
|
|
}, filepath, Juconfig['ImportType']), |
|
|
|
img: "https://lanmeiguojiang.com/tubiao/more/43.png", |
|
|
|
img: "https://lanmeiguojiang.com/tubiao/more/43.png", |
|
|
|
col_type: "icon_small_3" |
|
|
|
col_type: "icon_small_3", |
|
|
|
|
|
|
|
extra: { |
|
|
|
|
|
|
|
longClick: [{ |
|
|
|
|
|
|
|
title: Juconfig['ImportType']=="Coverage"?'导入模式:覆盖':'导入模式:跳过', |
|
|
|
|
|
|
|
js: $.toString((cfgfile, Juconfig) => { |
|
|
|
|
|
|
|
return $(["覆盖", "跳过"],2).select((cfgfile,Juconfig) => { |
|
|
|
|
|
|
|
Juconfig["ImportType"] = input=="覆盖"?"Coverage":"Skip"; |
|
|
|
|
|
|
|
writeFile(cfgfile, JSON.stringify(Juconfig)); |
|
|
|
|
|
|
|
refreshPage(false); |
|
|
|
|
|
|
|
return 'toast://导入模式已设置为:' + input; |
|
|
|
|
|
|
|
}, cfgfile, Juconfig) |
|
|
|
|
|
|
|
},cfgfile, Juconfig) |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
d.push({ |
|
|
|
d.push({ |
|
|
|
title: '分享', |
|
|
|
title: '分享', |
|
|
|