v2 up ioago94it0a
This commit is contained in:
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
/*Generated on:Mon Dec 03 2018 15:48:33 GMT+0100 (CET)*/
|
/*Generated on:Mon Dec 03 2018 20:20:02 GMT+0100 (CET)*/
|
||||||
var AutomaticDispose_Branch = "master";
|
var AutomaticDispose_Branch = "master";
|
||||||
var AutomaticDispose_URL = "https://jf.git.rest/Jomaar/automatic-dispose/raw/branch/";
|
var AutomaticDispose_URL = "https://jf.git.rest/Jomaar/automatic-dispose/raw/branch/";
|
||||||
var da_lss_adis_time = new Date().getTime();
|
var da_lss_adis_time = new Date().getTime();
|
||||||
|
|||||||
Vendored
+26
-30
@@ -1,4 +1,4 @@
|
|||||||
/*Generated on:Mon Dec 03 2018 15:48:33 GMT+0100 (CET)*/
|
/*Generated on:Mon Dec 03 2018 20:20:02 GMT+0100 (CET)*/
|
||||||
/*
|
/*
|
||||||
* Dexie.js - a minimalistic wrapper for IndexedDB
|
* Dexie.js - a minimalistic wrapper for IndexedDB
|
||||||
* ===============================================
|
* ===============================================
|
||||||
@@ -18647,37 +18647,33 @@ class AutomaticDispose {
|
|||||||
done: 'false'
|
done: 'false'
|
||||||
}).and(function (item) {
|
}).and(function (item) {
|
||||||
return item.next_check <= Math.floor(new Date().getTime() / 1000)
|
return item.next_check <= Math.floor(new Date().getTime() / 1000)
|
||||||
}).limit(1)
|
}).toArray()
|
||||||
}
|
}
|
||||||
}).then((Wunsch) => {
|
}).then((Wunsche) => {
|
||||||
// console.table(Wunsch);
|
Wunsche.sort((a, b) => {
|
||||||
if (Wunsch !== undefined) {
|
return a.next_check - b.next_check;
|
||||||
return Wunsch.count(function (count) {
|
});
|
||||||
if (count > 0) {
|
// console.table(Wunsche);
|
||||||
return Wunsch.each((myWunsch) => {
|
if (Wunsche.length > 0) {
|
||||||
// console.log("MYWUNSCH:")
|
let myWunsch = Wunsche[0];
|
||||||
// console.table(myWunsch);
|
// console.log("MYWUNSCH:")
|
||||||
let MissionID = myWunsch.missionID;
|
// console.table(myWunsch);
|
||||||
if ($('#' + runnerIframe).attr("mission_id") == "empty") {
|
let MissionID = myWunsch.missionID;
|
||||||
$('#' + runnerIframe).attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID);
|
if ($('#' + runnerIframe).attr("mission_id") == "empty") {
|
||||||
$('#' + runnerIframe).attr("mission_id", MissionID);
|
$('#' + runnerIframe).attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID);
|
||||||
// self.UpdateMissionsToDone(MissionID).then(() => {
|
$('#' + runnerIframe).attr("mission_id", MissionID);
|
||||||
// // console.log('done.... ' + Runner);
|
// self.UpdateMissionsToDone(MissionID).then(() => {
|
||||||
// $('#' + runnerIframe).attr("src", '');
|
// // console.log('done.... ' + Runner);
|
||||||
// $('#' + runnerIframe).attr("mission_id", 'empty');
|
// $('#' + runnerIframe).attr("src", '');
|
||||||
// setTimeout(self.OpenNextMission.bind(self), 5000, Runner);
|
// $('#' + runnerIframe).attr("mission_id", 'empty');
|
||||||
// })
|
// setTimeout(self.OpenNextMission.bind(self), 5000, Runner);
|
||||||
} else {
|
// })
|
||||||
// only while
|
} else {
|
||||||
// setTimeout(self.OpenNextMission.bind(self), 5000, Runner);
|
// only while
|
||||||
}
|
// setTimeout(self.OpenNextMission.bind(self), 5000, Runner);
|
||||||
});
|
}
|
||||||
} else {
|
|
||||||
return setTimeout(self.OpenNextMission.bind(self), 5000, Runner);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
return setTimeout(self.OpenNextMission.bind(self), 5000, Runner);
|
return setTimeout(self.OpenNextMission.bind(self), 1000, Runner);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+25
-29
@@ -1055,37 +1055,33 @@ class AutomaticDispose {
|
|||||||
done: 'false'
|
done: 'false'
|
||||||
}).and(function (item) {
|
}).and(function (item) {
|
||||||
return item.next_check <= Math.floor(new Date().getTime() / 1000)
|
return item.next_check <= Math.floor(new Date().getTime() / 1000)
|
||||||
}).limit(1)
|
}).toArray()
|
||||||
}
|
}
|
||||||
}).then((Wunsch) => {
|
}).then((Wunsche) => {
|
||||||
// console.table(Wunsch);
|
Wunsche.sort((a, b) => {
|
||||||
if (Wunsch !== undefined) {
|
return a.next_check - b.next_check;
|
||||||
return Wunsch.count(function (count) {
|
});
|
||||||
if (count > 0) {
|
// console.table(Wunsche);
|
||||||
return Wunsch.each((myWunsch) => {
|
if (Wunsche.length > 0) {
|
||||||
// console.log("MYWUNSCH:")
|
let myWunsch = Wunsche[0];
|
||||||
// console.table(myWunsch);
|
// console.log("MYWUNSCH:")
|
||||||
let MissionID = myWunsch.missionID;
|
// console.table(myWunsch);
|
||||||
if ($('#' + runnerIframe).attr("mission_id") == "empty") {
|
let MissionID = myWunsch.missionID;
|
||||||
$('#' + runnerIframe).attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID);
|
if ($('#' + runnerIframe).attr("mission_id") == "empty") {
|
||||||
$('#' + runnerIframe).attr("mission_id", MissionID);
|
$('#' + runnerIframe).attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID);
|
||||||
// self.UpdateMissionsToDone(MissionID).then(() => {
|
$('#' + runnerIframe).attr("mission_id", MissionID);
|
||||||
// // console.log('done.... ' + Runner);
|
// self.UpdateMissionsToDone(MissionID).then(() => {
|
||||||
// $('#' + runnerIframe).attr("src", '');
|
// // console.log('done.... ' + Runner);
|
||||||
// $('#' + runnerIframe).attr("mission_id", 'empty');
|
// $('#' + runnerIframe).attr("src", '');
|
||||||
// setTimeout(self.OpenNextMission.bind(self), 5000, Runner);
|
// $('#' + runnerIframe).attr("mission_id", 'empty');
|
||||||
// })
|
// setTimeout(self.OpenNextMission.bind(self), 5000, Runner);
|
||||||
} else {
|
// })
|
||||||
// only while
|
} else {
|
||||||
// setTimeout(self.OpenNextMission.bind(self), 5000, Runner);
|
// only while
|
||||||
}
|
// setTimeout(self.OpenNextMission.bind(self), 5000, Runner);
|
||||||
});
|
}
|
||||||
} else {
|
|
||||||
return setTimeout(self.OpenNextMission.bind(self), 5000, Runner);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
return setTimeout(self.OpenNextMission.bind(self), 5000, Runner);
|
return setTimeout(self.OpenNextMission.bind(self), 1000, Runner);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
(() => {
|
||||||
|
let msis = (async () => {
|
||||||
|
return await AutomaticDisposeCall.ADisDB.ADisMissions.where({
|
||||||
|
runner: 'om',
|
||||||
|
available: 'true',
|
||||||
|
done: 'false'
|
||||||
|
}).and(function (item) {
|
||||||
|
return item.next_check <= Math.floor(new Date().getTime() / 1000)
|
||||||
|
}).toArray()
|
||||||
|
})();
|
||||||
|
msis.then((result) => {
|
||||||
|
result.sort((a, b) => {
|
||||||
|
return a.next_check > b.next_check;
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}).then((sortedResult) => {
|
||||||
|
console.table(sortedResult);
|
||||||
|
});
|
||||||
|
})();
|
||||||
Reference in New Issue
Block a user