修复企鹅阅读的bug

This commit is contained in:
lxk0301
2020-12-10 10:42:46 +08:00
parent 28338aa99e
commit a2d183cce7
4 changed files with 63 additions and 38 deletions

View File

@@ -1010,6 +1010,7 @@ function CreateTuan() {
async function joinLeaderTuan() {
await updateTuanIds();
if (!$.tuanIdS) await updateTuanIdsCDN();
if (!$.tuanIdS) await updateTuanIdsCDN('https://cdn.jsdelivr.net/gh/lxk0301/updateTeam@master/jd_updateFactoryTuanId.json');
for (let tuanId of $.tuanIdS.tuanIds) {
if (!tuanId) continue
await JoinTuan(tuanId);
@@ -1184,7 +1185,7 @@ function updateTuanIds(url = 'https://raw.githubusercontent.com/lxk0301/updateTe
})
}
function updateTuanIdsCDN(url = 'https://raw.fastgit.org/lxk0301/updateTeam/master/jd_updateFactoryTuanId.json') {
return new Promise(resolve => {
return new Promise(async resolve => {
$.get({url}, (err, resp, data) => {
try {
if (err) {
@@ -1198,6 +1199,8 @@ function updateTuanIdsCDN(url = 'https://raw.fastgit.org/lxk0301/updateTeam/mast
resolve();
}
})
await $.wait(3000)
resolve();
})
}
function checkExchange() {