diff --git a/dist/autoloader.js b/dist/autoloader.js index fda9ecd..003d98d 100755 --- a/dist/autoloader.js +++ b/dist/autoloader.js @@ -1,4 +1,4 @@ -/*Generated on:Fri Jan 11 2019 02:00:15 GMT+0100 (CET)*/ +/*Generated on:Fri Jan 11 2019 02:08:57 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 0db8191..bb31342 100644 --- a/dist/autoloaderV2.js +++ b/dist/autoloaderV2.js @@ -1,4 +1,4 @@ -/*Generated on:Fri Jan 11 2019 02:00:15 GMT+0100 (CET)*/ +/*Generated on:Fri Jan 11 2019 02:08:57 GMT+0100 (CET)*/ /* * Dexie.js - a minimalistic wrapper for IndexedDB * =============================================== @@ -18765,15 +18765,17 @@ class AutomaticDispose { } window.console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').length, $('#vehicle_show_table_all input[type="checkbox"]:checked')); - window.console.log("WILL KLICK SEND", self.MissionID) - setTimeout(() => { - window.console.log("WILL KLICK SEND2", self.MissionID) - self.UpdateMissionsToDone(self.MissionID).then(() => { - tellParent(`console.log('ok:${window.name}:${self.MissionID}');`); + window.console.log("WILL KLICK SEND", self.MissionID, window.name) + + self.UpdateMissionsToDone(self.MissionID).then(() => { + tellParent(`console.log('ok:${window.name}:${self.MissionID}');`); + if ($('#vehicle_show_table_all input[type="checkbox"]:checked').length == 0) { + tellParent(`console.log('nocars:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); + } else { window.$('#mission_alarm_btn').click(); - window.console.log("WILL KLICK SEND3", self.MissionID) - }); - }, 250); + } + window.console.log("WILL KLICK SEND3", self.MissionID, window.name) + }); }) } diff --git a/src/autoloaderV2.js b/src/autoloaderV2.js index 30301a6..d46c8f4 100644 --- a/src/autoloaderV2.js +++ b/src/autoloaderV2.js @@ -1411,15 +1411,17 @@ class AutomaticDispose { } window.console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').length, $('#vehicle_show_table_all input[type="checkbox"]:checked')); - window.console.log("WILL KLICK SEND", self.MissionID) - setTimeout(() => { - window.console.log("WILL KLICK SEND2", self.MissionID) - self.UpdateMissionsToDone(self.MissionID).then(() => { - tellParent(`console.log('ok:${window.name}:${self.MissionID}');`); + window.console.log("WILL KLICK SEND", self.MissionID, window.name) + + self.UpdateMissionsToDone(self.MissionID).then(() => { + tellParent(`console.log('ok:${window.name}:${self.MissionID}');`); + if ($('#vehicle_show_table_all input[type="checkbox"]:checked').length == 0) { + tellParent(`console.log('nocars:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); + } else { window.$('#mission_alarm_btn').click(); - window.console.log("WILL KLICK SEND3", self.MissionID) - }); - }, 250); + } + window.console.log("WILL KLICK SEND3", self.MissionID, window.name) + }); }) }