Skip to content

Commit

Permalink
fix: Update scripts.js
Browse files Browse the repository at this point in the history
  • Loading branch information
amogh-daryapurkar authored Jul 2, 2024
1 parent 5e2b64c commit 1fbe677
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ function autolinkModals(element) {
});
}

async function loadCookieConsent(main) {
async function loadCookieConsent(footer) {
const cookieFragmentPath = '/fragments/cookie-banner';
const cookieFragment = await loadFragment(cookieFragmentPath);
main.append(cookieFragment);
footer.append(cookieFragment);
}


Check warning on line 119 in scripts/scripts.js

View workflow job for this annotation

GitHub Actions / build

Delete `⏎`
Expand All @@ -123,7 +123,7 @@ async function loadCookieConsent(main) {
*/
function buildAutoBlocks(main) {

Check failure on line 124 in scripts/scripts.js

View workflow job for this annotation

GitHub Actions / build

'main' is defined but never used
try {
loadCookieConsent(main);
//add auto blocks here

Check failure on line 126 in scripts/scripts.js

View workflow job for this annotation

GitHub Actions / build

Expected exception block, space or tab after '//' in comment
} catch (error) {
// eslint-disable-next-line no-console
console.error('Auto Blocking failed', error);
Expand Down Expand Up @@ -316,6 +316,7 @@ async function loadLazy(doc) {

Check warning on line 316 in scripts/scripts.js

View workflow job for this annotation

GitHub Actions / build

Delete `··`
loadHeader(doc.querySelector('header'));
loadFooter(doc.querySelector('footer'));
loadCookieConsent(doc.querySelector('footer'));

loadCSS(`${window.hlx.codeBasePath}/styles/lazy-styles.css`);
loadFonts();
Expand Down

0 comments on commit 1fbe677

Please sign in to comment.