From 74db0b9ffe69ca3b03bc60497337f86b3590b9f5 Mon Sep 17 00:00:00 2001 From: Leo Theobald Date: Thu, 2 May 2019 11:59:31 +0100 Subject: [PATCH] DD-1284; updated js refresh method --- js/lazyadslot.js | 2 +- lazyadslot.module | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/js/lazyadslot.js b/js/lazyadslot.js index ceda865..4ab5593 100755 --- a/js/lazyadslot.js +++ b/js/lazyadslot.js @@ -252,7 +252,7 @@ var lazyLoadAdSlot = lazyLoadAdSlot || {}; adSlotRendered[0].dispatchEvent(lazyslotready); // Refresh the tag. - if (parseInt(adSlot.refreshOnLoad)) { + if (googletag.pubads().isInitialLoadDisabled()) { googletag.pubads().refresh([googletag.slots[newID]]); } this.slotId = newID; diff --git a/lazyadslot.module b/lazyadslot.module index efef7a2..d713e21 100755 --- a/lazyadslot.module +++ b/lazyadslot.module @@ -98,9 +98,6 @@ function lazyadslot_page_build() { // All Ad needed markup. $tags[$key]['renderedDfp'] = '' . PHP_EOL . $slot_display; - - // Refresh on load. - $tags[$key]['refreshOnLoad'] = variable_get('dfp_disable_init_load', 0); } // Allow modules to alter the final tags.