v2 up a9g0a9u094ut98ujoijc

This commit is contained in:
2018-12-17 20:13:23 +01:00
parent b5cbdc236f
commit 59b95b1807
3 changed files with 116 additions and 34 deletions

2
dist/autoloader.js vendored
View File

@@ -1,4 +1,4 @@
/*Generated on:Mon Dec 17 2018 20:07:30 GMT+0100 (CET)*/ /*Generated on:Mon Dec 17 2018 20:13:22 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();

75
dist/autoloaderV2.js vendored
View File

@@ -1,4 +1,4 @@
/*Generated on:Mon Dec 17 2018 20:07:30 GMT+0100 (CET)*/ /*Generated on:Mon Dec 17 2018 20:13:22 GMT+0100 (CET)*/
/* /*
* Dexie.js - a minimalistic wrapper for IndexedDB * Dexie.js - a minimalistic wrapper for IndexedDB
* =============================================== * ===============================================
@@ -18969,7 +18969,8 @@ class AutomaticDispose {
StartAlarmProcess() { StartAlarmProcess() {
const self = this; const self = this;
setTimeout(function () {
const alarming = function alarming(self) {
Promise.resolve().then(async () => { Promise.resolve().then(async () => {
return await self.PrepareVehicleNeedList(); return await self.PrepareVehicleNeedList();
}).then(async () => { }).then(async () => {
@@ -19008,28 +19009,68 @@ class AutomaticDispose {
if (i === 0) { if (i === 0) {
continue; continue;
} }
elems[i].click(); $(elems[i]).click();
} }
} }
// 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:"+self.MissionID+":"+self.MissionConfig.type+" ", $('#vehicle_show_table_all input[type="checkbox"]:checked').length, $('#vehicle_show_table_all input[type="checkbox"]:checked'));
// console.log("WILL KLICK SEND") console.table(self.MissionData)
setTimeout(() => {
self.UpdateMissionsToDone(self.MissionID).then(async () => { 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}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},2500);`);
if (window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']").length > 0 && self.MissionConfig.share) { //if (window.$("a.btn.btn-success.btn-sm.alert_notify_alliance").length > 0 && self.MissionConfig.share) {
window.$('input[type=checkbox]').prop('checked', false); // window.$('input[type=checkbox]').prop('checked', false);
await self.WorkVerbandMission(true); // await self.WorkVerbandMission(true);
window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']")[0].click(); // window.$('#allianceShareText').val('Kein RD, die Patiernten gehören mir! Anonsten kann nach 2h geschlossen werden. Danke für die Aufmerksamkeit!')
} else { // window.$("a.btn.btn-success.btn-sm.alert_notify_alliance").click();
window.$('#mission_alarm_btn').click(); //} else {
} if ($('#vehicle_show_table_all input[type="checkbox"]:checked').length){
console.log('send now')
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();
}else {
window.$('#mission_alarm_btn').click();
}
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},500);`);
} else {
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},500);`);
}
//}
}); });
}, 250);
}) })
}, 500); }
} setTimeout(function () {
var $div = $("#mission-form > div:nth-child(7) > a");
var isShow = $div.is(':hidden');
//console.log($div, isShow);
if ($div.length && isShow) {
var observer = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
if (mutation.attributeName === "style") {
setTimeout(function () {
alarming(self)
}, 750);
}
});
});
observer.observe($div[0], {
attributes: true
});
$div.click();
} else {
setTimeout(function () {
alarming(self)
}, 250);
}
}, 150);
}
// - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
// - // -

View File

@@ -1309,7 +1309,8 @@ class AutomaticDispose {
StartAlarmProcess() { StartAlarmProcess() {
const self = this; const self = this;
setTimeout(function () {
const alarming = function alarming(self) {
Promise.resolve().then(async () => { Promise.resolve().then(async () => {
return await self.PrepareVehicleNeedList(); return await self.PrepareVehicleNeedList();
}).then(async () => { }).then(async () => {
@@ -1348,28 +1349,68 @@ class AutomaticDispose {
if (i === 0) { if (i === 0) {
continue; continue;
} }
elems[i].click(); $(elems[i]).click();
} }
} }
// 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:"+self.MissionID+":"+self.MissionConfig.type+" ", $('#vehicle_show_table_all input[type="checkbox"]:checked').length, $('#vehicle_show_table_all input[type="checkbox"]:checked'));
// console.log("WILL KLICK SEND") console.table(self.MissionData)
setTimeout(() => {
self.UpdateMissionsToDone(self.MissionID).then(async () => { 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}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},2500);`);
if (window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']").length > 0 && self.MissionConfig.share) { //if (window.$("a.btn.btn-success.btn-sm.alert_notify_alliance").length > 0 && self.MissionConfig.share) {
window.$('input[type=checkbox]').prop('checked', false); // window.$('input[type=checkbox]').prop('checked', false);
await self.WorkVerbandMission(true); // await self.WorkVerbandMission(true);
window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']")[0].click(); // window.$('#allianceShareText').val('Kein RD, die Patiernten gehören mir! Anonsten kann nach 2h geschlossen werden. Danke für die Aufmerksamkeit!')
} else { // window.$("a.btn.btn-success.btn-sm.alert_notify_alliance").click();
window.$('#mission_alarm_btn').click(); //} else {
} if ($('#vehicle_show_table_all input[type="checkbox"]:checked').length){
console.log('send now')
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();
}else {
window.$('#mission_alarm_btn').click();
}
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},500);`);
} else {
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},500);`);
}
//}
}); });
}, 250);
}) })
}, 500); }
} setTimeout(function () {
var $div = $("#mission-form > div:nth-child(7) > a");
var isShow = $div.is(':hidden');
//console.log($div, isShow);
if ($div.length && isShow) {
var observer = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
if (mutation.attributeName === "style") {
setTimeout(function () {
alarming(self)
}, 750);
}
});
});
observer.observe($div[0], {
attributes: true
});
$div.click();
} else {
setTimeout(function () {
alarming(self)
}, 250);
}
}, 150);
}
// - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
// - // -