4 Commits

Author SHA1 Message Date
Jomaar 36ddb429fa adoa 2018-12-19 17:54:33 +01:00
Jomaar f95f4a6483 xxx 2018-12-18 02:47:49 +01:00
Jomaar 6bbb9cc5cb xx 2018-12-18 02:35:47 +01:00
Jomaar b6532cbf27 x 2018-12-18 02:34:19 +01:00
3 changed files with 30 additions and 30 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
/*Generated on:Tue Dec 18 2018 01:35:32 GMT+0100 (CET)*/ /*Generated on:Tue Dec 18 2018 02:47:49 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();
+5 -5
View File
@@ -1,4 +1,4 @@
/*Generated on:Tue Dec 18 2018 01:35:32 GMT+0100 (CET)*/ /*Generated on:Tue Dec 18 2018 02:47:49 GMT+0100 (CET)*/
/* /*
* Dexie.js - a minimalistic wrapper for IndexedDB * Dexie.js - a minimalistic wrapper for IndexedDB
* =============================================== * ===============================================
@@ -18445,7 +18445,7 @@ class AutomaticDispose {
}) })
}) })
// } // }
}, 100); }, 500);
} }
@@ -18666,13 +18666,13 @@ class AutomaticDispose {
var $div = $("#mission-form > div:nth-child(7) > a"); var $div = $("#mission-form > div:nth-child(7) > a");
var isShow = $div.is(':hidden'); var isShow = $div.is(':hidden');
//console.log($div, isShow); //console.log($div, isShow);
if ($div.length && isShow) { if ($div.length && isShow && 1 == 0) {
var observer = new MutationObserver(function (mutations) { var observer = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) { mutations.forEach(function (mutation) {
if (mutation.attributeName === "style") { if (mutation.attributeName === "style") {
setTimeout(function () { setTimeout(function () {
alarming(self) alarming(self)
}, 500); }, 1500);
} }
}); });
}); });
@@ -18684,7 +18684,7 @@ class AutomaticDispose {
} else { } else {
setTimeout(function () { setTimeout(function () {
alarming(self) alarming(self)
}, 250); }, 500);
} }
+24 -24
View File
@@ -31,20 +31,20 @@ class AutomaticDispose {
self.Vehicles = {} self.Vehicles = {}
self.Patients = {} self.Patients = {}
this.ADis_MyHead = document.getElementsByTagName('head')[0]; self.ADis_MyHead = document.getElementsByTagName('head')[0];
this.ADis_MyBody = document.getElementsByTagName('body')[0]; self.ADis_MyBody = document.getElementsByTagName('body')[0];
// - // -
// - Sprechwunsch Variablen // - Sprechwunsch Variablen
// - // -
this.Jails = []; self.Jails = [];
this.JailRegEx = /\(Freie Zellen\:\s+(\d)\,\s+Entfernung\:\s+(\d+\,\d+)\s+km(?:\,\s+Abgabe an Besitzer\:\s+(\d+)%)?\)/g; self.JailRegEx = /\(Freie Zellen\:\s+(\d)\,\s+Entfernung\:\s+(\d+\,\d+)\s+km(?:\,\s+Abgabe an Besitzer\:\s+(\d+)%)?\)/g;
this.Hospitals = []; self.Hospitals = [];
this.RescueVehicleFrameWatchDog = null; self.RescueVehicleFrameWatchDog = null;
this.PoliceVehicleFrameWatchDog = null; self.PoliceVehicleFrameWatchDog = null;
this.ADisDB = new Dexie('LSS_AutomaticDispo'); self.ADisDB = new Dexie('LSS_AutomaticDispo');
this.ADisDB.version(1).stores({ self.ADisDB.version(1).stores({
/** /**
* AvailabelMissions * AvailabelMissions
* - missionID * - missionID
@@ -89,7 +89,7 @@ class AutomaticDispose {
*/ */
ADisMissions: "++missionID,runner,available,done,[missionID+available+done],[missionID+runner],[missionID+runner+done],[runner+available+done]" ADisMissions: "++missionID,runner,available,done,[missionID+available+done],[missionID+runner],[missionID+runner+done],[runner+available+done]"
}); });
this.ADisDB.on("populate", () => { self.ADisDB.on("populate", () => {
self.ADisDB.ADisSettings.add({ self.ADisDB.ADisSettings.add({
name: "Krankentransport-Automatic", name: "Krankentransport-Automatic",
value: 'true' value: 'true'
@@ -111,10 +111,10 @@ class AutomaticDispose {
value: 'false' value: 'false'
}); });
}); });
this.ADisDB.open().catch((err) => { self.ADisDB.open().catch((err) => {
console.error(err.stack || err); console.error(err.stack || err);
}); });
this.ADisDB.on("ready", async () => { self.ADisDB.on("ready", async () => {
self.adis_settings = { self.adis_settings = {
'Krankentransport-Automatic': false, 'Krankentransport-Automatic': false,
'Sprechwunsch-Automatic': false, 'Sprechwunsch-Automatic': false,
@@ -235,7 +235,7 @@ class AutomaticDispose {
OpenNextRescueSprechwunsch() { OpenNextRescueSprechwunsch() {
let self = this; let self = this;
this.ADSettings().then((setting) => { self.ADSettings().then((setting) => {
if (setting['Sprechwunsch-Automatic'] == 'true') { if (setting['Sprechwunsch-Automatic'] == 'true') {
return self.ADisDB.ADisSprechwunsch.where({ return self.ADisDB.ADisSprechwunsch.where({
done: 'false' done: 'false'
@@ -365,7 +365,7 @@ class AutomaticDispose {
}); });
self.Hospitals.reverse(); self.Hospitals.reverse();
this.Send_Vehicle_To_Hospital() self.Send_Vehicle_To_Hospital()
} }
// Krankenhaus einlieferung // Krankenhaus einlieferung
@@ -425,7 +425,7 @@ class AutomaticDispose {
OpenNextPoliceSprechwunsch() { OpenNextPoliceSprechwunsch() {
let self = this; let self = this;
this.ADSettings().then((setting) => { self.ADSettings().then((setting) => {
if (setting['Sprechwunsch-Automatic'] == 'true') { if (setting['Sprechwunsch-Automatic'] == 'true') {
return self.ADisDB.ADisSprechwunschPolice.where({ return self.ADisDB.ADisSprechwunschPolice.where({
done: 'false' done: 'false'
@@ -628,7 +628,7 @@ class AutomaticDispose {
self.Jails.reverse(); self.Jails.reverse();
if (self.Jails.length > 0) { if (self.Jails.length > 0) {
this.Send_Vehicle_To_Jail() self.Send_Vehicle_To_Jail()
} else { } else {
$("#mission_vehicle_driving tbody, #mission_vehicle_at_mission tbody").find("tr").each((_, elem) => { $("#mission_vehicle_driving tbody, #mission_vehicle_at_mission tbody").find("tr").each((_, elem) => {
var CalledVehicleID = parseInt($(elem).find("a").first().attr("vehicle_type_id")); var CalledVehicleID = parseInt($(elem).find("a").first().attr("vehicle_type_id"));
@@ -678,7 +678,7 @@ class AutomaticDispose {
var styleElement = document.createElement("link"); var styleElement = document.createElement("link");
styleElement.rel = "stylesheet"; styleElement.rel = "stylesheet";
styleElement.href = "https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700"; styleElement.href = "https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700";
this.ADis_MyHead.appendChild(styleElement); self.ADis_MyHead.appendChild(styleElement);
// - // -
// - FontAwesome 5 // - FontAwesome 5
@@ -686,7 +686,7 @@ class AutomaticDispose {
var scriptElement = document.createElement("script"); var scriptElement = document.createElement("script");
scriptElement.type = "text/javascript"; scriptElement.type = "text/javascript";
scriptElement.src = "https://use.fontawesome.com/releases/v5.5.0/js/all.js"; scriptElement.src = "https://use.fontawesome.com/releases/v5.5.0/js/all.js";
this.ADis_MyHead.appendChild(scriptElement); self.ADis_MyHead.appendChild(scriptElement);
// - // -
// - Navbar Dashboard // - Navbar Dashboard
@@ -695,8 +695,8 @@ class AutomaticDispose {
styleElement.rel = "stylesheet"; styleElement.rel = "stylesheet";
styleElement.type = "text/css"; styleElement.type = "text/css";
styleElement.media = "screen"; styleElement.media = "screen";
styleElement.href = this.ADisSettings.url + this.ADisSettings.branch + "/style/interface.css"; styleElement.href = self.ADisSettings.url + self.ADisSettings.branch + "/style/interface.css";
this.ADis_MyHead.appendChild(styleElement); self.ADis_MyHead.appendChild(styleElement);
// Create Dashboard // Create Dashboard
$('#news_li').before('<li id="adis-nav-item"></li>'); $('#news_li').before('<li id="adis-nav-item"></li>');
@@ -1204,7 +1204,7 @@ class AutomaticDispose {
}) })
}) })
// } // }
}, 100); }, 500);
} }
@@ -1425,13 +1425,13 @@ class AutomaticDispose {
var $div = $("#mission-form > div:nth-child(7) > a"); var $div = $("#mission-form > div:nth-child(7) > a");
var isShow = $div.is(':hidden'); var isShow = $div.is(':hidden');
//console.log($div, isShow); //console.log($div, isShow);
if ($div.length && isShow) { if ($div.length && isShow && 1 == 0) {
var observer = new MutationObserver(function (mutations) { var observer = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) { mutations.forEach(function (mutation) {
if (mutation.attributeName === "style") { if (mutation.attributeName === "style") {
setTimeout(function () { setTimeout(function () {
alarming(self) alarming(self)
}, 500); }, 1500);
} }
}); });
}); });
@@ -1443,7 +1443,7 @@ class AutomaticDispose {
} else { } else {
setTimeout(function () { setTimeout(function () {
alarming(self) alarming(self)
}, 250); }, 500);
} }