v2 up af90u9
This commit is contained in:
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
/*Generated on:Mon Dec 17 2018 21:14:22 GMT+0100 (CET)*/
|
/*Generated on:Mon Dec 17 2018 21:20:07 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();
|
||||||
|
|||||||
Vendored
+72
-37
@@ -1,4 +1,4 @@
|
|||||||
/*Generated on:Mon Dec 17 2018 21:14:22 GMT+0100 (CET)*/
|
/*Generated on:Mon Dec 17 2018 21:20:07 GMT+0100 (CET)*/
|
||||||
/*
|
/*
|
||||||
* Dexie.js - a minimalistic wrapper for IndexedDB
|
* Dexie.js - a minimalistic wrapper for IndexedDB
|
||||||
* ===============================================
|
* ===============================================
|
||||||
@@ -18362,40 +18362,48 @@ class AutomaticDispose {
|
|||||||
console.log("Window", window.name);
|
console.log("Window", window.name);
|
||||||
console.log("self.MyRunner", self.MyRunner);
|
console.log("self.MyRunner", self.MyRunner);
|
||||||
console.log("self.MyRunnerSettings", self.MyRunnerSettings);
|
console.log("self.MyRunnerSettings", self.MyRunnerSettings);
|
||||||
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => {
|
|
||||||
self.ADSettings().then((setting) => {
|
|
||||||
if (setting[self.MyRunnerSettings] === 'true') {
|
|
||||||
|
|
||||||
let where = {
|
if (self.includesString($('#iframe-inside-container > div.missionNotFound > div.missionNotFoundText').text(), 'Der Einsatz wurde erfolgreich abgeschlossen.')) {
|
||||||
missionID: self.MissionID,
|
console.log("DONE: " + self.MissionID);
|
||||||
runner: self.MyRunner,
|
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
||||||
done: 'false'
|
return tellParent(`console.log('handler:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // delete Mission here as completed
|
||||||
}
|
|
||||||
console.log(where);
|
|
||||||
return self.ADisDB.ADisMissions.where(where).and(function (item) {
|
|
||||||
return item.next_check <= Math.floor(new Date().getTime() / 1000)
|
|
||||||
}).limit(1)
|
|
||||||
}
|
|
||||||
}).then((Wunsch) => {
|
|
||||||
if (Wunsch !== undefined) {
|
|
||||||
return Wunsch.count(function (count) {
|
|
||||||
if (count > 0) {
|
|
||||||
return Wunsch.each((mywunsch) => {
|
|
||||||
return self.MainHandler()
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
|
||||||
return tellParent(`console.log('wunsch:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
|
||||||
return tellParent(`console.log('wunsch:2000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
})
|
} else {
|
||||||
|
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => {
|
||||||
|
self.ADSettings().then((setting) => {
|
||||||
|
if (setting[self.MyRunnerSettings] === 'true') {
|
||||||
|
|
||||||
|
let where = {
|
||||||
|
missionID: self.MissionID,
|
||||||
|
runner: self.MyRunner,
|
||||||
|
done: 'false'
|
||||||
|
}
|
||||||
|
console.log(where);
|
||||||
|
return self.ADisDB.ADisMissions.where(where).and(function (item) {
|
||||||
|
return item.next_check <= Math.floor(new Date().getTime() / 1000)
|
||||||
|
}).limit(1)
|
||||||
|
}
|
||||||
|
}).then((Wunsch) => {
|
||||||
|
if (Wunsch !== undefined) {
|
||||||
|
return Wunsch.count(function (count) {
|
||||||
|
if (count > 0) {
|
||||||
|
return Wunsch.each((mywunsch) => {
|
||||||
|
return self.MainHandler()
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
||||||
|
return tellParent(`console.log('wunsch:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
||||||
|
return tellParent(`console.log('wunsch:2000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
}, 1500);
|
}, 1500);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -18553,7 +18561,7 @@ class AutomaticDispose {
|
|||||||
|
|
||||||
StartAlarmProcess() {
|
StartAlarmProcess() {
|
||||||
const self = this;
|
const self = this;
|
||||||
setTimeout(function () {
|
const alarming = function alarming(self) {
|
||||||
Promise.resolve().then(async () => {
|
Promise.resolve().then(async () => {
|
||||||
return await self.PrepareVehicleNeedList();
|
return await self.PrepareVehicleNeedList();
|
||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
@@ -18583,8 +18591,8 @@ class AutomaticDispose {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').size(), $('#vehicle_show_table_all input[type="checkbox"]:checked'));
|
// console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').size(), $('#vehicle_show_table_all input[type="checkbox"]:checked'));
|
||||||
console.log("WILL KLICK SEND")
|
// console.log("WILL KLICK SEND")
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
||||||
self.UpdateMissionsToDone(self.MissionID).then(() => {
|
self.UpdateMissionsToDone(self.MissionID).then(() => {
|
||||||
@@ -18594,7 +18602,34 @@ class AutomaticDispose {
|
|||||||
}, 250);
|
}, 250);
|
||||||
|
|
||||||
})
|
})
|
||||||
}, 500);
|
};
|
||||||
|
|
||||||
|
setTimeout(function () {
|
||||||
|
var $div = $("#mission-form > div:nth-child(7) > a");
|
||||||
|
var isShow = $div.is(':hidden');
|
||||||
|
//console.log($div, isShow);
|
||||||
|
if ($div.length && isShow) {
|
||||||
|
var observer = new MutationObserver(function (mutations) {
|
||||||
|
mutations.forEach(function (mutation) {
|
||||||
|
if (mutation.attributeName === "style") {
|
||||||
|
setTimeout(function () {
|
||||||
|
alarming(self)
|
||||||
|
}, 750);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
observer.observe($div[0], {
|
||||||
|
attributes: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$div.click();
|
||||||
|
} else {
|
||||||
|
setTimeout(function () {
|
||||||
|
alarming(self)
|
||||||
|
}, 250);
|
||||||
|
}
|
||||||
|
}, 150);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
// - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||||
|
|||||||
+71
-36
@@ -1121,40 +1121,48 @@ class AutomaticDispose {
|
|||||||
console.log("Window", window.name);
|
console.log("Window", window.name);
|
||||||
console.log("self.MyRunner", self.MyRunner);
|
console.log("self.MyRunner", self.MyRunner);
|
||||||
console.log("self.MyRunnerSettings", self.MyRunnerSettings);
|
console.log("self.MyRunnerSettings", self.MyRunnerSettings);
|
||||||
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => {
|
|
||||||
self.ADSettings().then((setting) => {
|
|
||||||
if (setting[self.MyRunnerSettings] === 'true') {
|
|
||||||
|
|
||||||
let where = {
|
if (self.includesString($('#iframe-inside-container > div.missionNotFound > div.missionNotFoundText').text(), 'Der Einsatz wurde erfolgreich abgeschlossen.')) {
|
||||||
missionID: self.MissionID,
|
console.log("DONE: " + self.MissionID);
|
||||||
runner: self.MyRunner,
|
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
||||||
done: 'false'
|
return tellParent(`console.log('handler:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // delete Mission here as completed
|
||||||
}
|
|
||||||
console.log(where);
|
|
||||||
return self.ADisDB.ADisMissions.where(where).and(function (item) {
|
|
||||||
return item.next_check <= Math.floor(new Date().getTime() / 1000)
|
|
||||||
}).limit(1)
|
|
||||||
}
|
|
||||||
}).then((Wunsch) => {
|
|
||||||
if (Wunsch !== undefined) {
|
|
||||||
return Wunsch.count(function (count) {
|
|
||||||
if (count > 0) {
|
|
||||||
return Wunsch.each((mywunsch) => {
|
|
||||||
return self.MainHandler()
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
|
||||||
return tellParent(`console.log('wunsch:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
|
||||||
return tellParent(`console.log('wunsch:2000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
})
|
} else {
|
||||||
|
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => {
|
||||||
|
self.ADSettings().then((setting) => {
|
||||||
|
if (setting[self.MyRunnerSettings] === 'true') {
|
||||||
|
|
||||||
|
let where = {
|
||||||
|
missionID: self.MissionID,
|
||||||
|
runner: self.MyRunner,
|
||||||
|
done: 'false'
|
||||||
|
}
|
||||||
|
console.log(where);
|
||||||
|
return self.ADisDB.ADisMissions.where(where).and(function (item) {
|
||||||
|
return item.next_check <= Math.floor(new Date().getTime() / 1000)
|
||||||
|
}).limit(1)
|
||||||
|
}
|
||||||
|
}).then((Wunsch) => {
|
||||||
|
if (Wunsch !== undefined) {
|
||||||
|
return Wunsch.count(function (count) {
|
||||||
|
if (count > 0) {
|
||||||
|
return Wunsch.each((mywunsch) => {
|
||||||
|
return self.MainHandler()
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
||||||
|
return tellParent(`console.log('wunsch:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
||||||
|
return tellParent(`console.log('wunsch:2000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
}, 1500);
|
}, 1500);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1312,7 +1320,7 @@ class AutomaticDispose {
|
|||||||
|
|
||||||
StartAlarmProcess() {
|
StartAlarmProcess() {
|
||||||
const self = this;
|
const self = this;
|
||||||
setTimeout(function () {
|
const alarming = function alarming(self) {
|
||||||
Promise.resolve().then(async () => {
|
Promise.resolve().then(async () => {
|
||||||
return await self.PrepareVehicleNeedList();
|
return await self.PrepareVehicleNeedList();
|
||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
@@ -1342,8 +1350,8 @@ class AutomaticDispose {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').size(), $('#vehicle_show_table_all input[type="checkbox"]:checked'));
|
// console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').size(), $('#vehicle_show_table_all input[type="checkbox"]:checked'));
|
||||||
console.log("WILL KLICK SEND")
|
// console.log("WILL KLICK SEND")
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
||||||
self.UpdateMissionsToDone(self.MissionID).then(() => {
|
self.UpdateMissionsToDone(self.MissionID).then(() => {
|
||||||
@@ -1353,7 +1361,34 @@ class AutomaticDispose {
|
|||||||
}, 250);
|
}, 250);
|
||||||
|
|
||||||
})
|
})
|
||||||
}, 500);
|
};
|
||||||
|
|
||||||
|
setTimeout(function () {
|
||||||
|
var $div = $("#mission-form > div:nth-child(7) > a");
|
||||||
|
var isShow = $div.is(':hidden');
|
||||||
|
//console.log($div, isShow);
|
||||||
|
if ($div.length && isShow) {
|
||||||
|
var observer = new MutationObserver(function (mutations) {
|
||||||
|
mutations.forEach(function (mutation) {
|
||||||
|
if (mutation.attributeName === "style") {
|
||||||
|
setTimeout(function () {
|
||||||
|
alarming(self)
|
||||||
|
}, 750);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
observer.observe($div[0], {
|
||||||
|
attributes: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$div.click();
|
||||||
|
} else {
|
||||||
|
setTimeout(function () {
|
||||||
|
alarming(self)
|
||||||
|
}, 250);
|
||||||
|
}
|
||||||
|
}, 150);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
// - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||||
|
|||||||
Reference in New Issue
Block a user