diff --git a/dist/autoloader.js b/dist/autoloader.js index f31a649..1781164 100755 --- a/dist/autoloader.js +++ b/dist/autoloader.js @@ -1,4 +1,4 @@ -/*Generated on:Wed Nov 28 2018 20:33:16 GMT+0100 (CET)*/ +/*Generated on:Wed Nov 28 2018 20:35:45 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 8695973..a937a62 100644 --- a/dist/autoloaderV2.js +++ b/dist/autoloaderV2.js @@ -1,4 +1,4 @@ -/*Generated on:Wed Nov 28 2018 20:33:16 GMT+0100 (CET)*/ +/*Generated on:Wed Nov 28 2018 20:35:45 GMT+0100 (CET)*/ /* * Dexie.js - a minimalistic wrapper for IndexedDB * =============================================== @@ -4488,6 +4488,8 @@ class AutomaticDispose { } constructor() { + let that = this; + this.ADis_MyHead = document.getElementsByTagName('head')[0]; this.ADis_MyBody = document.getElementsByTagName('body')[0]; @@ -4500,7 +4502,7 @@ class AutomaticDispose { this.RescueVehicleFrameWatchDog = null; this.PoliceVehicleFrameWatchDog = null; - let that = this; + this.ADisDB = new Dexie('LSS_AutomaticDispo'); this.ADisDB.version(1).stores({ @@ -4584,11 +4586,11 @@ class AutomaticDispose { if (window.location.pathname === "/" || window.location.pathname === "/#") { that.IndexPage() - setInterval(that.CollectRescueSprechwuensche, 2500); - setInterval(that.OpenNextRescueSprechwunsch, 2500); + setInterval(that.CollectRescueSprechwuensche.bind(that), 2500); + setInterval(that.OpenNextRescueSprechwunsch.bind(that), 2500); that.CollectRescueSprechwuensche(); - setInterval(that.CollectPoliceSprechwuensche, 2500); - setInterval(that.OpenNextPoliceSprechwunsch, 2500); + setInterval(that.CollectPoliceSprechwuensche.bind(that), 2500); + setInterval(that.OpenNextPoliceSprechwunsch.bind(that), 2500); that.CollectPoliceSprechwuensche(); } diff --git a/src/autoloaderV2.js b/src/autoloaderV2.js index a8c9629..0fa05c8 100644 --- a/src/autoloaderV2.js +++ b/src/autoloaderV2.js @@ -13,6 +13,8 @@ class AutomaticDispose { } constructor() { + let that = this; + this.ADis_MyHead = document.getElementsByTagName('head')[0]; this.ADis_MyBody = document.getElementsByTagName('body')[0]; @@ -25,7 +27,7 @@ class AutomaticDispose { this.RescueVehicleFrameWatchDog = null; this.PoliceVehicleFrameWatchDog = null; - let that = this; + this.ADisDB = new Dexie('LSS_AutomaticDispo'); this.ADisDB.version(1).stores({ @@ -109,11 +111,11 @@ class AutomaticDispose { if (window.location.pathname === "/" || window.location.pathname === "/#") { that.IndexPage() - setInterval(that.CollectRescueSprechwuensche, 2500); - setInterval(that.OpenNextRescueSprechwunsch, 2500); + setInterval(that.CollectRescueSprechwuensche.bind(that), 2500); + setInterval(that.OpenNextRescueSprechwunsch.bind(that), 2500); that.CollectRescueSprechwuensche(); - setInterval(that.CollectPoliceSprechwuensche, 2500); - setInterval(that.OpenNextPoliceSprechwunsch, 2500); + setInterval(that.CollectPoliceSprechwuensche.bind(that), 2500); + setInterval(that.OpenNextPoliceSprechwunsch.bind(that), 2500); that.CollectPoliceSprechwuensche(); }