diff --git a/dist/autoloader.js b/dist/autoloader.js index ccf04f9..939ccc5 100755 --- a/dist/autoloader.js +++ b/dist/autoloader.js @@ -1,4 +1,4 @@ -/*Generated on:Sat Dec 01 2018 13:06:33 GMT+0100 (CET)*/ +/*Generated on:Sat Dec 01 2018 14:13:08 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 b847759..9b099d9 100644 --- a/dist/autoloaderV2.js +++ b/dist/autoloaderV2.js @@ -1,4 +1,4 @@ -/*Generated on:Sat Dec 01 2018 13:06:33 GMT+0100 (CET)*/ +/*Generated on:Sat Dec 01 2018 14:13:08 GMT+0100 (CET)*/ /* * Dexie.js - a minimalistic wrapper for IndexedDB * =============================================== @@ -17009,6 +17009,8 @@ class AutomaticDispose { }); this.ADisDB.on("ready", () => { + setInterval(self.genSettings.bind(self),1000); + if (window.location.pathname === "/" || window.location.pathname === "/#") { self.GetAvailableMissions() self.IndexPage() @@ -17055,14 +17057,16 @@ class AutomaticDispose { return string1.toLowerCase().includes(string2.toLowerCase()); } + genSettings() { + self.ADisDB.ADisSettings.each((setting) => { + self.adis_settings[setting.name] = setting.value; + }); + } + ADSettings() { let self = this; return new Promise(async (resolve, reject) => { - let res = {}; - await self.ADisDB.ADisSettings.each((setting) => { - res[setting.name] = setting.value; - }); - resolve(res); + return resolve(self.adis_settings); }) } @@ -18156,7 +18160,7 @@ class AutomaticDispose { if ($('#' + runnerIframeName).attr("mission_id") == "empty") { $('#' + runnerIframeName).attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID); $('#' + runnerIframeName).attr("mission_id", MissionID); - self.UpdateMissionsToDone(MissionID).then(()=>{ + self.UpdateMissionsToDone(MissionID).then(() => { $('#' + runnerIframeName).attr("src", ''); $('#' + runnerIframeName).attr("mission_id", 'empty'); setTimeout(self.OpenNextMission.bind(self), 5000, Runner); diff --git a/src/autoloaderV2.js b/src/autoloaderV2.js index 46296e1..e31ed2b 100644 --- a/src/autoloaderV2.js +++ b/src/autoloaderV2.js @@ -116,6 +116,8 @@ class AutomaticDispose { }); this.ADisDB.on("ready", () => { + setInterval(self.genSettings.bind(self),1000); + if (window.location.pathname === "/" || window.location.pathname === "/#") { self.GetAvailableMissions() self.IndexPage() @@ -162,14 +164,16 @@ class AutomaticDispose { return string1.toLowerCase().includes(string2.toLowerCase()); } + genSettings() { + self.ADisDB.ADisSettings.each((setting) => { + self.adis_settings[setting.name] = setting.value; + }); + } + ADSettings() { let self = this; return new Promise(async (resolve, reject) => { - let res = {}; - await self.ADisDB.ADisSettings.each((setting) => { - res[setting.name] = setting.value; - }); - resolve(res); + return resolve(self.adis_settings); }) } @@ -1029,7 +1033,7 @@ class AutomaticDispose { if ($('#' + runnerIframeName).attr("mission_id") == "empty") { $('#' + runnerIframeName).attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID); $('#' + runnerIframeName).attr("mission_id", MissionID); - self.UpdateMissionsToDone(MissionID).then(()=>{ + self.UpdateMissionsToDone(MissionID).then(() => { $('#' + runnerIframeName).attr("src", ''); $('#' + runnerIframeName).attr("mission_id", 'empty'); setTimeout(self.OpenNextMission.bind(self), 5000, Runner);