From 66a7d82ed32f3f25dbeee77c160b9cd329bf3ed7 Mon Sep 17 00:00:00 2001 From: Victor Hargrave Date: Tue, 24 Sep 2024 19:49:59 +0200 Subject: [PATCH] fix branch urls not working --- express/scripts/scripts.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/express/scripts/scripts.js b/express/scripts/scripts.js index 8cf7cbd1..d949e4aa 100644 --- a/express/scripts/scripts.js +++ b/express/scripts/scripts.js @@ -205,6 +205,12 @@ function decorateHeroLCP(loadStyle, config, createTag, getMetadata) { const budouxExcludeSelector = createTag('meta', { property: 'jpwordwrap:budoux-exclude-selector', content: 'p' }); document.head.append(budouxExcludeSelector); } + + if (getMetadata('sheet-powered') === 'Y') { + const { default: replaceContent } = await import('./utils/content-replace.js'); + await replaceContent(document.querySelector('main')); + } + // Decorate the page with site specific needs. decorateArea(); @@ -233,8 +239,6 @@ function decorateHeroLCP(loadStyle, config, createTag, getMetadata) { if (urlParams.get('martech') !== 'off' && getMetadata('martech') !== 'off') { import('./instrument.js').then((mod) => { mod.default(); }); } - const { default: replaceContent } = await import('./utils/content-replace.js'); - await replaceContent(document.querySelector('main')); await loadArea(); import('./express-delayed.js').then((mod) => {