diff --git a/dist/autoloader.js b/dist/autoloader.js index be69673..9713e21 100755 --- a/dist/autoloader.js +++ b/dist/autoloader.js @@ -1,4 +1,4 @@ -/*Generated on:Sun Dec 02 2018 22:03:16 GMT+0100 (CET)*/ +/*Generated on:Sun Dec 02 2018 22:13:01 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 832c276..fbd7a70 100644 --- a/dist/autoloaderV2.js +++ b/dist/autoloaderV2.js @@ -1,4 +1,4 @@ -/*Generated on:Sun Dec 02 2018 22:03:16 GMT+0100 (CET)*/ +/*Generated on:Sun Dec 02 2018 22:13:01 GMT+0100 (CET)*/ /* * Dexie.js - a minimalistic wrapper for IndexedDB * =============================================== @@ -16960,6 +16960,7 @@ class AutomaticDispose { self.MissionID = null self.MyRunner = null self.MyRunnerSettings = null + self.OweSecure = false self._ADisVehiclesNeed = {} self.MissionConfig = {} @@ -18443,6 +18444,9 @@ class AutomaticDispose { }).then((Missions) => { if (Missions.length > 0) { var Mission = Missions[0]; + if (self.MyRunner == 'os'){ + self.OweSecure = true; + } self.GetMissionConfiguration(self.MyRunner == 'kt' ? 147 : Mission.type); } }); @@ -18499,17 +18503,23 @@ class AutomaticDispose { .then(async () => { return await self.ProcessWaterRescue() }).then(() => { - console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').size(), $('#vehicle_show_table_all input[type="checkbox"]:checked')); - if (['adis-ownmissions', 'adis-krankentransporte', 'adis-verbandmission'].indexOf(window.name) !== -1) { - console.log("WILL KLICK SEND") - setTimeout(() => { - self.UpdateMissionsToDone(self.MissionID).then(() => { - tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');},500);`); - window.$('#mission_alarm_btn').click(); - }); - }, 250); + if (self.OweSecure) { + if ($('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]:not(:checked)').size() > 0) { + $('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]:not(:checked)')[0].click(); + } } + + console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').size(), $('#vehicle_show_table_all input[type="checkbox"]:checked')); + console.log("WILL KLICK SEND") + setTimeout(() => { + + self.UpdateMissionsToDone(self.MissionID).then(() => { + tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');},500);`); + window.$('#mission_alarm_btn').click(); + }); + }, 250); + }) }, 500); } diff --git a/src/autoloaderV2.js b/src/autoloaderV2.js index 28dd956..1d3d663 100644 --- a/src/autoloaderV2.js +++ b/src/autoloaderV2.js @@ -24,6 +24,7 @@ class AutomaticDispose { self.MissionID = null self.MyRunner = null self.MyRunnerSettings = null + self.OweSecure = false self._ADisVehiclesNeed = {} self.MissionConfig = {} @@ -1273,6 +1274,9 @@ class AutomaticDispose { }).then((Missions) => { if (Missions.length > 0) { var Mission = Missions[0]; + if (self.MyRunner == 'os'){ + self.OweSecure = true; + } self.GetMissionConfiguration(self.MyRunner == 'kt' ? 147 : Mission.type); } }); @@ -1329,17 +1333,23 @@ class AutomaticDispose { .then(async () => { return await self.ProcessWaterRescue() }).then(() => { - console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').size(), $('#vehicle_show_table_all input[type="checkbox"]:checked')); - if (['adis-ownmissions', 'adis-krankentransporte', 'adis-verbandmission'].indexOf(window.name) !== -1) { - console.log("WILL KLICK SEND") - setTimeout(() => { - self.UpdateMissionsToDone(self.MissionID).then(() => { - tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');},500);`); - window.$('#mission_alarm_btn').click(); - }); - }, 250); + if (self.OweSecure) { + if ($('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]:not(:checked)').size() > 0) { + $('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]:not(:checked)')[0].click(); + } } + + console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').size(), $('#vehicle_show_table_all input[type="checkbox"]:checked')); + console.log("WILL KLICK SEND") + setTimeout(() => { + + self.UpdateMissionsToDone(self.MissionID).then(() => { + tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');},500);`); + window.$('#mission_alarm_btn').click(); + }); + }, 250); + }) }, 500); }