diff --git a/dist/autoloader.js b/dist/autoloader.js index 4541e50..74758c3 100755 --- a/dist/autoloader.js +++ b/dist/autoloader.js @@ -1,4 +1,4 @@ -/*Generated on:Wed Dec 19 2018 19:34:49 GMT+0100 (CET)*/ +/*Generated on:Wed Dec 19 2018 19:53:55 GMT+0100 (CET)*/ var AutomaticDispose_Branch = "master"; var AutomaticDispose_URL = "https://jf.git.rest/Jomaar/automatic-dispose/raw/branch/"; var da_lss_adis_time = new Date().getTime(); diff --git a/dist/autoloaderV2.js b/dist/autoloaderV2.js index 0362f9d..fc70e91 100644 --- a/dist/autoloaderV2.js +++ b/dist/autoloaderV2.js @@ -1,4 +1,4 @@ -/*Generated on:Wed Dec 19 2018 19:34:49 GMT+0100 (CET)*/ +/*Generated on:Wed Dec 19 2018 19:53:55 GMT+0100 (CET)*/ /* * Dexie.js - a minimalistic wrapper for IndexedDB * =============================================== @@ -17135,11 +17135,11 @@ class AutomaticDispose { if (window.location.pathname === "/" || window.location.pathname === "/#") { self.GetAvailableMissions() self.IndexPage() - setInterval(self.CollectRescueSprechwuensche.bind(self), 2500); - setInterval(self.OpenNextRescueSprechwunsch.bind(self), 5000); + setInterval(self.CollectRescueSprechwuensche.bind(self), 3500); + setInterval(self.OpenNextRescueSprechwunsch.bind(self), 1000); self.CollectRescueSprechwuensche(); - setInterval(self.CollectPoliceSprechwuensche.bind(self), 2500); - setInterval(self.OpenNextPoliceSprechwunsch.bind(self), 5000); + setInterval(self.CollectPoliceSprechwuensche.bind(self), 3500); + setInterval(self.OpenNextPoliceSprechwunsch.bind(self), 1000); self.CollectPoliceSprechwuensche(); setTimeout(() => { @@ -18409,41 +18409,41 @@ class AutomaticDispose { // return tellParent(`console.log('handler:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // delete Mission here as completed // }) // } else { - return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => { - self.ADSettings().then((setting) => { - if (setting[self.MyRunnerSettings] === 'true') { + return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => { + self.ADSettings().then((setting) => { + if (setting[self.MyRunnerSettings] === 'true') { - let where = { - missionID: self.MissionID, - runner: self.MyRunner, - done: 'false' + let where = { + missionID: self.MissionID, + runner: self.MyRunner, + done: 'false' + } + // console.log(where); + return self.ADisDB.ADisMissions.where(where).and(function (item) { + return item.next_check <= Math.floor(new Date().getTime() / 1000) + }).limit(1) + } + }).then((Wunsch) => { + if (Wunsch !== undefined) { + return Wunsch.count(function (count) { + if (count > 0) { + return Wunsch.each((mywunsch) => { + console.table(mywunsch); + return self.MainHandler() + }); + } else { + return self.UpdateMissionsToDone(self.MissionID).then(() => { + return tellParent(`console.log('wunsch:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); + }) } - // console.log(where); - return self.ADisDB.ADisMissions.where(where).and(function (item) { - return item.next_check <= Math.floor(new Date().getTime() / 1000) - }).limit(1) - } - }).then((Wunsch) => { - if (Wunsch !== undefined) { - return Wunsch.count(function (count) { - if (count > 0) { - return Wunsch.each((mywunsch) => { - console.table(mywunsch); - return self.MainHandler() - }); - } else { - return self.UpdateMissionsToDone(self.MissionID).then(() => { - return tellParent(`console.log('wunsch:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); - }) - } - }); - } else { - return self.RemoveMissionsFromQueue(self.MissionID).then(() => { - return tellParent(`console.log('wunsch:2000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); - }) - } - }) + }); + } else { + return self.RemoveMissionsFromQueue(self.MissionID).then(() => { + return tellParent(`console.log('wunsch:2000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); + }) + } }) + }) // } }, 500); } diff --git a/src/autoloaderV2.js b/src/autoloaderV2.js index ea4731a..88d14da 100644 --- a/src/autoloaderV2.js +++ b/src/autoloaderV2.js @@ -128,11 +128,11 @@ class AutomaticDispose { if (window.location.pathname === "/" || window.location.pathname === "/#") { self.GetAvailableMissions() self.IndexPage() - setInterval(self.CollectRescueSprechwuensche.bind(self), 2500); - setInterval(self.OpenNextRescueSprechwunsch.bind(self), 5000); + setInterval(self.CollectRescueSprechwuensche.bind(self), 3500); + setInterval(self.OpenNextRescueSprechwunsch.bind(self), 1000); self.CollectRescueSprechwuensche(); - setInterval(self.CollectPoliceSprechwuensche.bind(self), 2500); - setInterval(self.OpenNextPoliceSprechwunsch.bind(self), 5000); + setInterval(self.CollectPoliceSprechwuensche.bind(self), 3500); + setInterval(self.OpenNextPoliceSprechwunsch.bind(self), 1000); self.CollectPoliceSprechwuensche(); setTimeout(() => { @@ -1168,41 +1168,41 @@ class AutomaticDispose { // return tellParent(`console.log('handler:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // delete Mission here as completed // }) // } else { - return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => { - self.ADSettings().then((setting) => { - if (setting[self.MyRunnerSettings] === 'true') { + return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => { + self.ADSettings().then((setting) => { + if (setting[self.MyRunnerSettings] === 'true') { - let where = { - missionID: self.MissionID, - runner: self.MyRunner, - done: 'false' + let where = { + missionID: self.MissionID, + runner: self.MyRunner, + done: 'false' + } + // console.log(where); + return self.ADisDB.ADisMissions.where(where).and(function (item) { + return item.next_check <= Math.floor(new Date().getTime() / 1000) + }).limit(1) + } + }).then((Wunsch) => { + if (Wunsch !== undefined) { + return Wunsch.count(function (count) { + if (count > 0) { + return Wunsch.each((mywunsch) => { + console.table(mywunsch); + return self.MainHandler() + }); + } else { + return self.UpdateMissionsToDone(self.MissionID).then(() => { + return tellParent(`console.log('wunsch:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); + }) } - // console.log(where); - return self.ADisDB.ADisMissions.where(where).and(function (item) { - return item.next_check <= Math.floor(new Date().getTime() / 1000) - }).limit(1) - } - }).then((Wunsch) => { - if (Wunsch !== undefined) { - return Wunsch.count(function (count) { - if (count > 0) { - return Wunsch.each((mywunsch) => { - console.table(mywunsch); - return self.MainHandler() - }); - } else { - return self.UpdateMissionsToDone(self.MissionID).then(() => { - return tellParent(`console.log('wunsch:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); - }) - } - }); - } else { - return self.RemoveMissionsFromQueue(self.MissionID).then(() => { - return tellParent(`console.log('wunsch:2000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); - }) - } - }) + }); + } else { + return self.RemoveMissionsFromQueue(self.MissionID).then(() => { + return tellParent(`console.log('wunsch:2000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); + }) + } }) + }) // } }, 500); }