From 8224bd00f3b13e39c39fa2ee7cdf85b658f32ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Fr=C3=B6hle?= Date: Mon, 17 Dec 2018 15:36:15 +0100 Subject: [PATCH] v2 up 09ai9g0a9ugji --- dist/autoloader.js | 2 +- dist/autoloaderV2.js | 23 ++++++++++++++++++++++- src/autoloaderV2.js | 21 +++++++++++++++++++++ 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/dist/autoloader.js b/dist/autoloader.js index 082b4d9..a7e976a 100755 --- a/dist/autoloader.js +++ b/dist/autoloader.js @@ -1,4 +1,4 @@ -/*Generated on:Mon Dec 17 2018 15:21:41 GMT+0100 (CET)*/ +/*Generated on:Mon Dec 17 2018 15:36:15 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 ecac666..619e188 100644 --- a/dist/autoloaderV2.js +++ b/dist/autoloaderV2.js @@ -1,4 +1,4 @@ -/*Generated on:Mon Dec 17 2018 15:21:41 GMT+0100 (CET)*/ +/*Generated on:Mon Dec 17 2018 15:36:15 GMT+0100 (CET)*/ /* * Dexie.js - a minimalistic wrapper for IndexedDB * =============================================== @@ -18516,6 +18516,27 @@ class AutomaticDispose { CollectMissions() { const self = this; + + self.ADSettings().then((setting) => { + return self.ADisDB.ADisMissions.toCollection() + }).then((Missions) => { + if (typeof Missions !== "undefined") { + + return Missions.count((count) => { + if (count > 0) { + return Missions.each((MyMission) => { + var MissionElement = $("#mission_" + MyMission.missionID); + if (MissionElement.length == 0 ){ + // + self.RemoveMissionsFromQueue(MyMission.missionID) + } + }); + } + }); + } + }); + + const MyOwnObserver = new MutationObserver((mutations) => { mutations.forEach((mutation) => { // console.log(mutation.target.id); diff --git a/src/autoloaderV2.js b/src/autoloaderV2.js index d226681..e76fda7 100644 --- a/src/autoloaderV2.js +++ b/src/autoloaderV2.js @@ -856,6 +856,27 @@ class AutomaticDispose { CollectMissions() { const self = this; + + self.ADSettings().then((setting) => { + return self.ADisDB.ADisMissions.toCollection() + }).then((Missions) => { + if (typeof Missions !== "undefined") { + + return Missions.count((count) => { + if (count > 0) { + return Missions.each((MyMission) => { + var MissionElement = $("#mission_" + MyMission.missionID); + if (MissionElement.length == 0 ){ + // + self.RemoveMissionsFromQueue(MyMission.missionID) + } + }); + } + }); + } + }); + + const MyOwnObserver = new MutationObserver((mutations) => { mutations.forEach((mutation) => { // console.log(mutation.target.id);