This commit is contained in:
2018-12-19 18:28:19 +01:00
parent 36ddb429fa
commit 03acece31b
3 changed files with 72 additions and 24 deletions

68
dist/autoloaderV2.js vendored
View File

@@ -1,4 +1,4 @@
/*Generated on:Tue Dec 18 2018 02:47:49 GMT+0100 (CET)*/
/*Generated on:Wed Dec 19 2018 18:28:18 GMT+0100 (CET)*/
/*
* Dexie.js - a minimalistic wrapper for IndexedDB
* ===============================================
@@ -17038,20 +17038,20 @@ class AutomaticDispose {
self.Vehicles = {}
self.Patients = {}
this.ADis_MyHead = document.getElementsByTagName('head')[0];
this.ADis_MyBody = document.getElementsByTagName('body')[0];
self.ADis_MyHead = document.getElementsByTagName('head')[0];
self.ADis_MyBody = document.getElementsByTagName('body')[0];
// -
// - Sprechwunsch Variablen
// -
this.Jails = [];
this.JailRegEx = /\(Freie Zellen\:\s+(\d)\,\s+Entfernung\:\s+(\d+\,\d+)\s+km(?:\,\s+Abgabe an Besitzer\:\s+(\d+)%)?\)/g;
this.Hospitals = [];
this.RescueVehicleFrameWatchDog = null;
this.PoliceVehicleFrameWatchDog = null;
self.Jails = [];
self.JailRegEx = /\(Freie Zellen\:\s+(\d)\,\s+Entfernung\:\s+(\d+\,\d+)\s+km(?:\,\s+Abgabe an Besitzer\:\s+(\d+)%)?\)/g;
self.Hospitals = [];
self.RescueVehicleFrameWatchDog = null;
self.PoliceVehicleFrameWatchDog = null;
this.ADisDB = new Dexie('LSS_AutomaticDispo');
this.ADisDB.version(1).stores({
self.ADisDB = new Dexie('LSS_AutomaticDispo');
self.ADisDB.version(1).stores({
/**
* AvailabelMissions
* - missionID
@@ -17096,7 +17096,7 @@ class AutomaticDispose {
*/
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({
name: "Krankentransport-Automatic",
value: 'true'
@@ -17118,10 +17118,10 @@ class AutomaticDispose {
value: 'false'
});
});
this.ADisDB.open().catch((err) => {
self.ADisDB.open().catch((err) => {
console.error(err.stack || err);
});
this.ADisDB.on("ready", async () => {
self.ADisDB.on("ready", async () => {
self.adis_settings = {
'Krankentransport-Automatic': false,
'Sprechwunsch-Automatic': false,
@@ -17242,7 +17242,7 @@ class AutomaticDispose {
OpenNextRescueSprechwunsch() {
let self = this;
this.ADSettings().then((setting) => {
self.ADSettings().then((setting) => {
if (setting['Sprechwunsch-Automatic'] == 'true') {
return self.ADisDB.ADisSprechwunsch.where({
done: 'false'
@@ -17372,7 +17372,7 @@ class AutomaticDispose {
});
self.Hospitals.reverse();
this.Send_Vehicle_To_Hospital()
self.Send_Vehicle_To_Hospital()
}
// Krankenhaus einlieferung
@@ -17432,7 +17432,7 @@ class AutomaticDispose {
OpenNextPoliceSprechwunsch() {
let self = this;
this.ADSettings().then((setting) => {
self.ADSettings().then((setting) => {
if (setting['Sprechwunsch-Automatic'] == 'true') {
return self.ADisDB.ADisSprechwunschPolice.where({
done: 'false'
@@ -17635,7 +17635,7 @@ class AutomaticDispose {
self.Jails.reverse();
if (self.Jails.length > 0) {
this.Send_Vehicle_To_Jail()
self.Send_Vehicle_To_Jail()
} else {
$("#mission_vehicle_driving tbody, #mission_vehicle_at_mission tbody").find("tr").each((_, elem) => {
var CalledVehicleID = parseInt($(elem).find("a").first().attr("vehicle_type_id"));
@@ -17685,7 +17685,7 @@ class AutomaticDispose {
var styleElement = document.createElement("link");
styleElement.rel = "stylesheet";
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
@@ -17693,7 +17693,7 @@ class AutomaticDispose {
var scriptElement = document.createElement("script");
scriptElement.type = "text/javascript";
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
@@ -17702,8 +17702,8 @@ class AutomaticDispose {
styleElement.rel = "stylesheet";
styleElement.type = "text/css";
styleElement.media = "screen";
styleElement.href = this.ADisSettings.url + this.ADisSettings.branch + "/style/interface.css";
this.ADis_MyHead.appendChild(styleElement);
styleElement.href = self.ADisSettings.url + self.ADisSettings.branch + "/style/interface.css";
self.ADis_MyHead.appendChild(styleElement);
// Create Dashboard
$('#news_li').before('<li id="adis-nav-item"></li>');
@@ -19638,4 +19638,28 @@ class AutomaticDispose {
}
window.AutomaticDisposeCall = new AutomaticDispose();
$(document).ready(function () {
var $div = $("a:contains('Fahrzeuganzeige begrenzt! Fehlende Fahrzeuge laden!')");
var isShow = $div.is(':hidden');
//console.log($div, isShow);
if ($div.length && isShow && 1 == 0) {
var observer = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
if (mutation.attributeName === "style") {
setTimeout(function () {
window.AutomaticDisposeCall = new AutomaticDispose();
}, 1500);
}
});
});
observer.observe($div[0], {
attributes: true
});
$div.click();
} else {
setTimeout(function () {
window.AutomaticDisposeCall = new AutomaticDispose();
}, 500);
}
});