v2 up ia90afi09

This commit is contained in:
2018-12-03 21:55:31 +01:00
parent 537f48db96
commit bb0db92ef9
3 changed files with 22 additions and 12 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
/*Generated on:Mon Dec 03 2018 21:41:35 GMT+0100 (CET)*/ /*Generated on:Mon Dec 03 2018 21:55:31 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();
+11 -6
View File
@@ -1,4 +1,4 @@
/*Generated on:Mon Dec 03 2018 21:41:35 GMT+0100 (CET)*/ /*Generated on:Mon Dec 03 2018 21:55:31 GMT+0100 (CET)*/
/* /*
* Dexie.js - a minimalistic wrapper for IndexedDB * Dexie.js - a minimalistic wrapper for IndexedDB
* =============================================== * ===============================================
@@ -21038,12 +21038,15 @@ class AutomaticDispose {
// - // -
// - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
WorkVerbandMission() { WorkVerbandMission(myself) {
if (typeof myself === 'undefined') {
myself=false
}
const self = this; const self = this;
self.ADSettings().then((setting) => { return self.ADSettings().then((setting) => {
var title = document.getElementById('missionH1'); var title = document.getElementById('missionH1');
var isVerband = title.innerText.toLowerCase().includes("[verband]"); var isVerband = title.innerText.toLowerCase().includes("[verband]");
if (setting['Alliance-Automatic'] == 'true' && isVerband) { if ((setting['Alliance-Automatic'] == 'true' && isVerband) || myself) {
if ([52, 55, 129, 203].indexOf(self.MissionType) !== -1 && $('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]').size() > 0) { if ([52, 55, 129, 203].indexOf(self.MissionType) !== -1 && $('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]').size() > 0) {
$('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]')[0].click(); $('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]')[0].click();
} else if ([53, 130, 202].indexOf(self.MissionType) !== -1) { } else if ([53, 130, 202].indexOf(self.MissionType) !== -1) {
@@ -21082,7 +21085,7 @@ class AutomaticDispose {
} }
} }
// Todo add alternative cars, please no LF because of Mülltonne.... // Todo add alternative cars, please no LF because of Mülltonne....
if ($('#vehicle_show_table_all input[type="checkbox"]:checked').size() > 0) { if ($('#vehicle_show_table_all input[type="checkbox"]:checked').size() > 0 && myself == false) {
$('#mission_alarm_btn').click(); $('#mission_alarm_btn').click();
} }
} }
@@ -21204,9 +21207,11 @@ class AutomaticDispose {
// console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').length, $('#vehicle_show_table_all input[type="checkbox"]:checked')); // console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').length, $('#vehicle_show_table_all input[type="checkbox"]:checked'));
// console.log("WILL KLICK SEND") // console.log("WILL KLICK SEND")
setTimeout(() => { setTimeout(() => {
self.UpdateMissionsToDone(self.MissionID).then(() => { self.UpdateMissionsToDone(self.MissionID).then( async () => {
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');},500);`); tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');},500);`);
if (window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']").length > 0 && self.MissionConfig.share) { if (window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']").length > 0 && self.MissionConfig.share) {
window.$('input[type=checkbox]').prop('checked',false);
await self.WorkVerbandMission(true);
window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']")[0].click(); window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']")[0].click();
} else { } else {
window.$('#mission_alarm_btn').click(); window.$('#mission_alarm_btn').click();
+10 -5
View File
@@ -1186,12 +1186,15 @@ class AutomaticDispose {
// - // -
// - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
WorkVerbandMission() { WorkVerbandMission(myself) {
if (typeof myself === 'undefined') {
myself=false
}
const self = this; const self = this;
self.ADSettings().then((setting) => { return self.ADSettings().then((setting) => {
var title = document.getElementById('missionH1'); var title = document.getElementById('missionH1');
var isVerband = title.innerText.toLowerCase().includes("[verband]"); var isVerband = title.innerText.toLowerCase().includes("[verband]");
if (setting['Alliance-Automatic'] == 'true' && isVerband) { if ((setting['Alliance-Automatic'] == 'true' && isVerband) || myself) {
if ([52, 55, 129, 203].indexOf(self.MissionType) !== -1 && $('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]').size() > 0) { if ([52, 55, 129, 203].indexOf(self.MissionType) !== -1 && $('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]').size() > 0) {
$('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]')[0].click(); $('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]')[0].click();
} else if ([53, 130, 202].indexOf(self.MissionType) !== -1) { } else if ([53, 130, 202].indexOf(self.MissionType) !== -1) {
@@ -1230,7 +1233,7 @@ class AutomaticDispose {
} }
} }
// Todo add alternative cars, please no LF because of Mülltonne.... // Todo add alternative cars, please no LF because of Mülltonne....
if ($('#vehicle_show_table_all input[type="checkbox"]:checked').size() > 0) { if ($('#vehicle_show_table_all input[type="checkbox"]:checked').size() > 0 && myself == false) {
$('#mission_alarm_btn').click(); $('#mission_alarm_btn').click();
} }
} }
@@ -1352,9 +1355,11 @@ class AutomaticDispose {
// console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').length, $('#vehicle_show_table_all input[type="checkbox"]:checked')); // console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').length, $('#vehicle_show_table_all input[type="checkbox"]:checked'));
// console.log("WILL KLICK SEND") // console.log("WILL KLICK SEND")
setTimeout(() => { setTimeout(() => {
self.UpdateMissionsToDone(self.MissionID).then(() => { self.UpdateMissionsToDone(self.MissionID).then( async () => {
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');},500);`); tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');},500);`);
if (window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']").length > 0 && self.MissionConfig.share) { if (window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']").length > 0 && self.MissionConfig.share) {
window.$('input[type=checkbox]').prop('checked',false);
await self.WorkVerbandMission(true);
window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']")[0].click(); window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']")[0].click();
} else { } else {
window.$('#mission_alarm_btn').click(); window.$('#mission_alarm_btn').click();