From 06ab23bdca99ece992c58f0fe13c8c44f057afc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Fr=C3=B6hle?= Date: Fri, 11 Jan 2019 02:21:49 +0100 Subject: [PATCH] v291832943 --- dist/autoloader.js | 2 +- dist/autoloaderV2.js | 23 ++++++++++++++--------- src/autoloaderV2.js | 21 +++++++++++++-------- 3 files changed, 28 insertions(+), 18 deletions(-) diff --git a/dist/autoloader.js b/dist/autoloader.js index ccaf1aa..2702c55 100755 --- a/dist/autoloader.js +++ b/dist/autoloader.js @@ -1,4 +1,4 @@ -/*Generated on:Fri Jan 11 2019 02:15:04 GMT+0100 (CET)*/ +/*Generated on:Fri Jan 11 2019 02:21:48 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 3d1dd7f..7faecf5 100644 --- a/dist/autoloaderV2.js +++ b/dist/autoloaderV2.js @@ -1,4 +1,4 @@ -/*Generated on:Fri Jan 11 2019 02:15:04 GMT+0100 (CET)*/ +/*Generated on:Fri Jan 11 2019 02:21:48 GMT+0100 (CET)*/ /* * Dexie.js - a minimalistic wrapper for IndexedDB * =============================================== @@ -19762,6 +19762,7 @@ class AutomaticDispose { $(document).ready(function () { var $div = $("a:contains('Fahrzeuganzeige begrenzt! Fehlende Fahrzeuge laden!')"); var isShow = $div.is(':hidden'); + var ppppp = undefined; var MissionID = document.location.pathname.substr(document.location.pathname.lastIndexOf("/") + 1); console.log($div, isShow, MissionID); if ($div.length && isShow) { @@ -19770,19 +19771,23 @@ $(document).ready(function () { console.log(mutation.type, MissionID); console.table(mutation, MissionID); if (mutation.attributeName === "style") { - setTimeout(function () { + if (typeof ppppp != 'undefined'){ + clearTimeout(ppppp); + } + ppppp = setTimeout(function () { window.AutomaticDisposeCall = new AutomaticDispose(); }, 1500); } }); }); - observer.observe($div[0], { - attributes: true, - characterData: true, - attributeOldValue: true, - characterDataOldValue: true - }); - + $div.each(function(index,item){ + observer.observe(item, { + attributes: true, + characterData: true, + attributeOldValue: true, + characterDataOldValue: true + }); + }) $div.click(); } else { window.AutomaticDisposeCall = new AutomaticDispose(); diff --git a/src/autoloaderV2.js b/src/autoloaderV2.js index 5aa065f..753b11e 100644 --- a/src/autoloaderV2.js +++ b/src/autoloaderV2.js @@ -2408,6 +2408,7 @@ class AutomaticDispose { $(document).ready(function () { var $div = $("a:contains('Fahrzeuganzeige begrenzt! Fehlende Fahrzeuge laden!')"); var isShow = $div.is(':hidden'); + var ppppp = undefined; var MissionID = document.location.pathname.substr(document.location.pathname.lastIndexOf("/") + 1); console.log($div, isShow, MissionID); if ($div.length && isShow) { @@ -2416,19 +2417,23 @@ $(document).ready(function () { console.log(mutation.type, MissionID); console.table(mutation, MissionID); if (mutation.attributeName === "style") { - setTimeout(function () { + if (typeof ppppp != 'undefined'){ + clearTimeout(ppppp); + } + ppppp = setTimeout(function () { window.AutomaticDisposeCall = new AutomaticDispose(); }, 1500); } }); }); - observer.observe($div[0], { - attributes: true, - characterData: true, - attributeOldValue: true, - characterDataOldValue: true - }); - + $div.each(function(index,item){ + observer.observe(item, { + attributes: true, + characterData: true, + attributeOldValue: true, + characterDataOldValue: true + }); + }) $div.click(); } else { window.AutomaticDisposeCall = new AutomaticDispose();