From d1ebbf2f8d359a6b9ae349ad5b7c49c13e0c1f2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Fr=C3=B6hle?= Date: Wed, 20 Feb 2019 01:05:31 +0100 Subject: [PATCH] check against runner before delete --- dist/autoloader.js | 2 +- dist/autoloaderV2.js | 10 +++++----- src/autoloaderV2.js | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dist/autoloader.js b/dist/autoloader.js index 977fb0c..2853380 100755 --- a/dist/autoloader.js +++ b/dist/autoloader.js @@ -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(); diff --git a/dist/autoloaderV2.js b/dist/autoloaderV2.js index 2cf6b82..2c4ecb1 100644 --- a/dist/autoloaderV2.js +++ b/dist/autoloaderV2.js @@ -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);`); diff --git a/src/autoloaderV2.js b/src/autoloaderV2.js index 233a405..f5eb703 100644 --- a/src/autoloaderV2.js +++ b/src/autoloaderV2.js @@ -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);`);