更新 'SrcJyPublic.js'

master
src48597962 7 months ago
parent b293ba352a
commit b4931d26eb
  1. 10
      SrcJyPublic.js

@ -47,7 +47,7 @@ function getDatas(lx, isyx) {
let dyJkTmpFile = cachepath + md5(Juconfig['dySource']) + ".json"; let dyJkTmpFile = cachepath + md5(Juconfig['dySource']) + ".json";
if(!fileExist(dyJkTmpFile)){ if(!fileExist(dyJkTmpFile)){
showLoading('正在加载订阅源,请稍后...'); showLoading('正在加载订阅源,请稍后...');
let contnet = getJkContnet(Juconfig['dySource']); let contnet = getContnet(Juconfig['dySource']);
if(contnet){ if(contnet){
writeFile(dyJkTmpFile, contnet); writeFile(dyJkTmpFile, contnet);
} }
@ -198,11 +198,13 @@ function shuffleArray(array) {
return array; return array;
} }
//获取在线文件内容 //获取在线文件内容
function getJkContnet(url) { function getContnet(url) {
if(!url.startsWith('http')){ if(url.startsWith('file')){
return fetch(url);
}else if(!url.startsWith('http')){
return ''; return '';
} }
if(url.startsWith('https://raw.github')){ if(url.startsWith('https://raw.githubusercontent.com')){
let proxys = $.require('ghproxy').getproxy(); let proxys = $.require('ghproxy').getproxy();
shuffleArray(proxys); shuffleArray(proxys);
for(let i=0;i<proxys.length;i++){ for(let i=0;i<proxys.length;i++){

Loading…
Cancel
Save