Skip to content

Commit

Permalink
TDW-2277 call loadAds function in loadPage
Browse files Browse the repository at this point in the history
  • Loading branch information
bosco-ensemble committed Apr 9, 2024
1 parent d225216 commit 663adb2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,8 @@ async function loadPage(doc) {
// eslint-disable-next-line no-use-before-define
await loadLazy(doc);
// eslint-disable-next-line no-use-before-define
await loadAds();
// eslint-disable-next-line no-use-before-define
loadDelayed(doc);
}

Expand Down Expand Up @@ -1070,10 +1072,6 @@ async function loadLazy(doc) {

doc.querySelectorAll('div:not([class]):not([id]):empty').forEach((empty) => empty.remove());

Check failure on line 1073 in scripts/scripts.js

View workflow job for this annotation

GitHub Actions / build

Block must not be padded by blank lines

window.setTimeout(async () => {
// eslint-disable-next-line no-use-before-define
await loadAds();
}, 1000);
}

/**
Expand Down Expand Up @@ -1231,8 +1229,8 @@ async function loadAds() {

window.OptanonWrapper = OptanonWrapper;

if (doc.querySelector('.marketing')) {
const marketingBlock = doc.querySelector('.marketing');
if (document.querySelector('.marketing')) {
const marketingBlock = document.querySelector('.marketing');
decorateBlock(marketingBlock);
await loadBlock(marketingBlock);
}
Expand Down

0 comments on commit 663adb2

Please sign in to comment.