From 097a2af975341766088d5047e8fc2dcf43045819 Mon Sep 17 00:00:00 2001 From: hparwani2 Date: Thu, 4 May 2023 11:07:21 +0530 Subject: [PATCH 1/7] Fixing screen fliker issue --- blocks/header/nav-utils.js | 1 + head.html | 22 ++++++++++++++++++++++ scripts/delayed.js | 3 --- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/blocks/header/nav-utils.js b/blocks/header/nav-utils.js index b1cd6ff1..a26ea162 100644 --- a/blocks/header/nav-utils.js +++ b/blocks/header/nav-utils.js @@ -15,6 +15,7 @@ const REPLACE_SCRIPTS = new Map([ const IGNORE_SCRIPTS = new Set([ '/etc.clientlibs/nedbank/components/socialshare/clientlibs.min.js', '/etc.clientlibs/nedbank/components/bankfilter/clientlibs.min.js', + '/6422e0f550a2/017d80491d7e/launch-e08352bc3db4.min.js', ]); function cssLoaded() { diff --git a/head.html b/head.html index b71f922b..9fcd593d 100644 --- a/head.html +++ b/head.html @@ -1,4 +1,26 @@ + + diff --git a/scripts/delayed.js b/scripts/delayed.js index 523558bc..78d7baf7 100644 --- a/scripts/delayed.js +++ b/scripts/delayed.js @@ -177,8 +177,5 @@ function createDigitalData() { // add more delayed functionality here (function adobeotm() { - const adobeotmscript = document.createElement('script'); createDigitalData(); - adobeotmscript.setAttribute('src', 'https://assets.adobedtm.com/6422e0f550a2/017d80491d7e/launch-1e8527b948f6-development.min.js'); - document.head.append(adobeotmscript); }()); From 520d1e8a19bd6c30d456fcb25169b650a01201ee Mon Sep 17 00:00:00 2001 From: hparwani2 Date: Thu, 4 May 2023 11:19:03 +0530 Subject: [PATCH 2/7] Fixing screen fliker issue temporary commit --- head.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/head.html b/head.html index 9fcd593d..2cd0bf2b 100644 --- a/head.html +++ b/head.html @@ -1,6 +1,6 @@ - --> From 9ea0a56a988040c5457f28bfd19bcca8ec104953 Mon Sep 17 00:00:00 2001 From: hparwani2 Date: Thu, 4 May 2023 11:22:02 +0530 Subject: [PATCH 3/7] Fixing screen fliker issue temporary commit --- head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/head.html b/head.html index 2cd0bf2b..123afd65 100644 --- a/head.html +++ b/head.html @@ -21,6 +21,6 @@ } )(window, document, "body {opacity: 0 !important}", 3E3); --> - + From 428d79828309c3e4ab2745bebb3105440c8d6efc Mon Sep 17 00:00:00 2001 From: hparwani2 Date: Thu, 4 May 2023 11:40:08 +0530 Subject: [PATCH 4/7] Fixing screen fliker issue temporary commit --- head.html | 8 ++++---- scripts/delayed.js | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/head.html b/head.html index 123afd65..238b100a 100644 --- a/head.html +++ b/head.html @@ -1,6 +1,6 @@ - - + )(window, document, "body {opacity: 1 !important}", 3E3); + + diff --git a/scripts/delayed.js b/scripts/delayed.js index 78d7baf7..b0778865 100644 --- a/scripts/delayed.js +++ b/scripts/delayed.js @@ -177,5 +177,8 @@ function createDigitalData() { // add more delayed functionality here (function adobeotm() { + // const adobeotmscript = document.createElement('script'); createDigitalData(); + // adobeotmscript.setAttribute('src', 'https://assets.adobedtm.com/6422e0f550a2/017d80491d7e/launch-1e8527b948f6-development.min.js'); + // document.head.append(adobeotmscript); }()); From 987f43ffef438df61ee70a431ec5bd0d5bcb69e6 Mon Sep 17 00:00:00 2001 From: hparwani2 Date: Fri, 5 May 2023 09:10:24 +0530 Subject: [PATCH 5/7] Fixing screen fliker issue temporary commit --- head.html | 14 ++++---------- scripts/delayed.js | 6 +++--- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/head.html b/head.html index 238b100a..b722775f 100644 --- a/head.html +++ b/head.html @@ -1,26 +1,20 @@ - - + diff --git a/scripts/delayed.js b/scripts/delayed.js index b0778865..523558bc 100644 --- a/scripts/delayed.js +++ b/scripts/delayed.js @@ -177,8 +177,8 @@ function createDigitalData() { // add more delayed functionality here (function adobeotm() { - // const adobeotmscript = document.createElement('script'); + const adobeotmscript = document.createElement('script'); createDigitalData(); - // adobeotmscript.setAttribute('src', 'https://assets.adobedtm.com/6422e0f550a2/017d80491d7e/launch-1e8527b948f6-development.min.js'); - // document.head.append(adobeotmscript); + adobeotmscript.setAttribute('src', 'https://assets.adobedtm.com/6422e0f550a2/017d80491d7e/launch-1e8527b948f6-development.min.js'); + document.head.append(adobeotmscript); }()); From 5d1f77f6fbda7cfb45f5363421a87b12c4cb1d27 Mon Sep 17 00:00:00 2001 From: hparwani2 Date: Mon, 8 May 2023 11:05:05 +0530 Subject: [PATCH 6/7] review comments --- head.html | 17 +---------------- scripts/delayed.js | 8 ++++++++ 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/head.html b/head.html index b722775f..21ff78eb 100644 --- a/head.html +++ b/head.html @@ -1,20 +1,5 @@ - + diff --git a/scripts/delayed.js b/scripts/delayed.js index 523558bc..baa97dbc 100644 --- a/scripts/delayed.js +++ b/scripts/delayed.js @@ -182,3 +182,11 @@ function createDigitalData() { adobeotmscript.setAttribute('src', 'https://assets.adobedtm.com/6422e0f550a2/017d80491d7e/launch-1e8527b948f6-development.min.js'); document.head.append(adobeotmscript); }()); + +setTimeout(function(){ + var head = document.getElementsByTagName("head")[0]; + if(head) { + var atBodyStyle = document.getElementById("at-body-style"); + atBodyStyle && head.removeChild(atBodyStyle); + } +}, 30000); From d57bb9708459cdc7048bda3c2cb6c7317f280a15 Mon Sep 17 00:00:00 2001 From: hparwani2 Date: Mon, 8 May 2023 11:08:50 +0530 Subject: [PATCH 7/7] review comments --- scripts/delayed.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/delayed.js b/scripts/delayed.js index baa97dbc..c42f43fe 100644 --- a/scripts/delayed.js +++ b/scripts/delayed.js @@ -183,10 +183,10 @@ function createDigitalData() { document.head.append(adobeotmscript); }()); -setTimeout(function(){ - var head = document.getElementsByTagName("head")[0]; - if(head) { - var atBodyStyle = document.getElementById("at-body-style"); - atBodyStyle && head.removeChild(atBodyStyle); +setTimeout(() => { + const head = document.getElementsByTagName('head')[0]; + if (head) { + const atBodyStyle = document.getElementById('at-body-style'); + head.removeChild(atBodyStyle); } }, 30000);