This commit is contained in:
2018-11-24 16:33:56 +01:00
parent 9fef72e405
commit 3b2adf1611
3 changed files with 26 additions and 4 deletions

15
dist/autoloader.js vendored
View File

@@ -1,4 +1,4 @@
/*Generated on:Sat Nov 24 2018 16:25:38 GMT+0100 (CET)*/ /*Generated on:Sat Nov 24 2018 16:33:55 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();
@@ -6443,13 +6443,24 @@ ADisDB.on("ready", () => {
}).then(() => { }).then(() => {
console.log('ADis_CollectPoliceSprechwuensche: add'); console.log('ADis_CollectPoliceSprechwuensche: add');
var MOIODOS = $('div#mission_list div.missionSideBarEntry:visible'); var MOIODOS = $('div#mission_list div.missionSideBarEntry:visible');
MOIODOS.each(function (index) { return MOIODOS.each(function (index) {
console.log('ADis_CollectPoliceSprechwuensche: add', $(this).text().match(/Gefangene sollen abtransportiert werden/g)); console.log('ADis_CollectPoliceSprechwuensche: add', $(this).text().match(/Gefangene sollen abtransportiert werden/g));
if ($(this).text().match(/Gefangene sollen abtransportiert werden/g)) { if ($(this).text().match(/Gefangene sollen abtransportiert werden/g)) {
var MissionID = $(this).attr("mission_id"); var MissionID = $(this).attr("mission_id");
ADis_AddPoliceSprechwunschToQueue(MissionID); ADis_AddPoliceSprechwunschToQueue(MissionID);
} }
}); });
}).then(()=>{
$("#building_list").find(".building_list_vehicle_element").each(function () {
var VehicleStatus = $(this).find(".building_list_fms").text();
var VehicleType = Number(parseInt($(this).find("a").attr("vehicle_type_id")));
var VehicleID = $(this).attr("vehicle_id");
var _meap = $('#radio_messages_important > li.radio_message_vehicle_' + VehicleID + ' > a:contains("Zum Einsatz")').attr('href');
var MissionID = _meap.substr(_meap.lastIndexOf("/") + 1);
if (MissionID && VehicleStatus == "5" && [32, 52].indexOf(VehicleType) !== -1) {
ADis_AddPoliceSprechwunschToQueue(MissionID);
}
});
}); });
} }

2
dist/standalone.js vendored
View File

@@ -1,4 +1,4 @@
/*Generated on:Sat Nov 24 2018 16:25:38 GMT+0100 (CET)*/ /*Generated on:Sat Nov 24 2018 16:33:55 GMT+0100 (CET)*/
function includesString(string1, string2) { function includesString(string1, string2) {
return string1.toLowerCase().includes(string2.toLowerCase()); return string1.toLowerCase().includes(string2.toLowerCase());
} }

View File

@@ -27,13 +27,24 @@ function ADis_CollectPoliceSprechwuensche() {
}).then(() => { }).then(() => {
console.log('ADis_CollectPoliceSprechwuensche: add'); console.log('ADis_CollectPoliceSprechwuensche: add');
var MOIODOS = $('div#mission_list div.missionSideBarEntry:visible'); var MOIODOS = $('div#mission_list div.missionSideBarEntry:visible');
MOIODOS.each(function (index) { return MOIODOS.each(function (index) {
console.log('ADis_CollectPoliceSprechwuensche: add', $(this).text().match(/Gefangene sollen abtransportiert werden/g)); console.log('ADis_CollectPoliceSprechwuensche: add', $(this).text().match(/Gefangene sollen abtransportiert werden/g));
if ($(this).text().match(/Gefangene sollen abtransportiert werden/g)) { if ($(this).text().match(/Gefangene sollen abtransportiert werden/g)) {
var MissionID = $(this).attr("mission_id"); var MissionID = $(this).attr("mission_id");
ADis_AddPoliceSprechwunschToQueue(MissionID); ADis_AddPoliceSprechwunschToQueue(MissionID);
} }
}); });
}).then(()=>{
$("#building_list").find(".building_list_vehicle_element").each(function () {
var VehicleStatus = $(this).find(".building_list_fms").text();
var VehicleType = Number(parseInt($(this).find("a").attr("vehicle_type_id")));
var VehicleID = $(this).attr("vehicle_id");
var _meap = $('#radio_messages_important > li.radio_message_vehicle_' + VehicleID + ' > a:contains("Zum Einsatz")').attr('href');
var MissionID = _meap.substr(_meap.lastIndexOf("/") + 1);
if (MissionID && VehicleStatus == "5" && [32, 52].indexOf(VehicleType) !== -1) {
ADis_AddPoliceSprechwunschToQueue(MissionID);
}
});
}); });
} }