check against runner before delete

This commit is contained in:
2019-02-20 01:05:31 +01:00
parent 24799d2f3a
commit d1ebbf2f8d
3 changed files with 10 additions and 10 deletions

2
dist/autoloader.js vendored
View File

@@ -1,4 +1,4 @@
/*Generated on:Wed Feb 20 2019 00:54:37 GMT+0100 (CET)*/
/*Generated on:Wed Feb 20 2019 01:05:30 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();

10
dist/autoloaderV2.js vendored
View File

@@ -1,4 +1,4 @@
/*Generated on:Wed Feb 20 2019 00:54:37 GMT+0100 (CET)*/
/*Generated on:Wed Feb 20 2019 01:05:30 GMT+0100 (CET)*/
/*
* Dexie.js - a minimalistic wrapper for IndexedDB
* ===============================================
@@ -19142,7 +19142,7 @@ class AutomaticDispose {
if (count > 0) {
return Missions.each((MyMission) => {
var MissionElement = $("#mission_" + MyMission.missionID);
if (MissionElement.length == 0 || MissionElement.text().match(/Gefangene sollen abtransportiert werden/g) || $('#mission_panel_' + MyMission.missionID).hasClass('mission_panel_green') || $('#mission_panel_' + MyMission.missionID).hasClass('mission_panel_yellow')) {
if ((MissionElement.length == 0 || MissionElement.text().match(/Gefangene sollen abtransportiert werden/g) || $('#mission_panel_' + MyMission.missionID).hasClass('mission_panel_green') || $('#mission_panel_' + MyMission.missionID).hasClass('mission_panel_yellow')) && MyMission.runner != 'os') {
// remove
//console.log("Remove :", MyMission)
self.RemoveMissionsFromQueue(MyMission.missionID)
@@ -19593,7 +19593,7 @@ class AutomaticDispose {
}).then((Missions) => {
if (Missions.length > 0) {
var Mission = Missions[0];
if (self.MyRunner == 'os' && (self.includesString($('#missionH1').text(), '[verband]') || !self.includesString($('#missionH1').text(), '[event]'))) {
if (self.MyRunner == 'os' && ( self.includesString($('#missionH1').text(), '[verband]') || !self.includesString($('#missionH1').text(), '[event]') )) {
self.OweSecure = true;
}
self.GetMissionConfiguration(Mission.type);
@@ -19695,10 +19695,10 @@ class AutomaticDispose {
}
} else {
if (self.MyRunner == 'os' && self.OweSecure) {
tellParent(`console.log('sendcars1:${self.Runner}:${self.OweSecure}:${window.name}:${self.MissionID}');setTimeout(function(){window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},1000);`);
tellParent(`console.log('sendcars1:${self.MyRunner}:${self.OweSecure}:${window.name}:${self.MissionID}');setTimeout(function(){window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},1000);`);
window.$('#mission_alarm_btn').click();
} else if (self.MyRunner == 'os' && !self.OweSecure) {
tellParent(`/*console.log('sendcars2:${self.Runner}:${self.OweSecure}:${window.name}:${self.MissionID}');*/setTimeout(function(){window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},1000);`);
tellParent(`/*console.log('sendcars2:${self.MyRunner}:${self.OweSecure}:${window.name}:${self.MissionID}');*/setTimeout(function(){window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},1000);`);
window.$('#container_navbar_alarm > div > div.navbar-header > div:nth-child(3) > a.btn.btn-success.btn-sm.alert_next_alliance.hidden-xs').click();
} else {
tellParent(`/*console.log('sendcars:${window.name}:${self.MissionID}');*/setTimeout(function(){window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},1000);`);

View File

@@ -1109,7 +1109,7 @@ class AutomaticDispose {
if (count > 0) {
return Missions.each((MyMission) => {
var MissionElement = $("#mission_" + MyMission.missionID);
if (MissionElement.length == 0 || MissionElement.text().match(/Gefangene sollen abtransportiert werden/g) || $('#mission_panel_' + MyMission.missionID).hasClass('mission_panel_green') || $('#mission_panel_' + MyMission.missionID).hasClass('mission_panel_yellow')) {
if ((MissionElement.length == 0 || MissionElement.text().match(/Gefangene sollen abtransportiert werden/g) || $('#mission_panel_' + MyMission.missionID).hasClass('mission_panel_green') || $('#mission_panel_' + MyMission.missionID).hasClass('mission_panel_yellow')) && MyMission.runner != 'os') {
// remove
//console.log("Remove :", MyMission)
self.RemoveMissionsFromQueue(MyMission.missionID)
@@ -1560,7 +1560,7 @@ class AutomaticDispose {
}).then((Missions) => {
if (Missions.length > 0) {
var Mission = Missions[0];
if (self.MyRunner == 'os' && (self.includesString($('#missionH1').text(), '[verband]') || !self.includesString($('#missionH1').text(), '[event]'))) {
if (self.MyRunner == 'os' && ( self.includesString($('#missionH1').text(), '[verband]') || !self.includesString($('#missionH1').text(), '[event]') )) {
self.OweSecure = true;
}
self.GetMissionConfiguration(Mission.type);
@@ -1662,10 +1662,10 @@ class AutomaticDispose {
}
} else {
if (self.MyRunner == 'os' && self.OweSecure) {
tellParent(`console.log('sendcars1:${self.Runner}:${self.OweSecure}:${window.name}:${self.MissionID}');setTimeout(function(){window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},1000);`);
tellParent(`console.log('sendcars1:${self.MyRunner}:${self.OweSecure}:${window.name}:${self.MissionID}');setTimeout(function(){window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},1000);`);
window.$('#mission_alarm_btn').click();
} else if (self.MyRunner == 'os' && !self.OweSecure) {
tellParent(`/*console.log('sendcars2:${self.Runner}:${self.OweSecure}:${window.name}:${self.MissionID}');*/setTimeout(function(){window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},1000);`);
tellParent(`/*console.log('sendcars2:${self.MyRunner}:${self.OweSecure}:${window.name}:${self.MissionID}');*/setTimeout(function(){window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},1000);`);
window.$('#container_navbar_alarm > div > div.navbar-header > div:nth-child(3) > a.btn.btn-success.btn-sm.alert_next_alliance.hidden-xs').click();
} else {
tellParent(`/*console.log('sendcars:${window.name}:${self.MissionID}');*/setTimeout(function(){window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},1000);`);