@@ -544,28 +544,14 @@ async function runDefaultHeaderLogic(block) {
544544 } ) ;
545545 } ) ;
546546
547- // TODO: please remove this if statement when the mega menu
548- // for these domains gets created in AEM
549- const regex = / \/ ( z h - h k | z h - t w ) \/ / i;
550- const matches = window . location . href . match ( regex ) ;
551- if ( matches ) {
552- const newScriptFile = document . createElement ( 'script' ) ;
553- newScriptFile . src = '/_src/scripts/vendor/mega-menu/mega-menu.js' ;
554- newScriptFile . defer = true ;
555- shadowRoot . appendChild ( newScriptFile ) ;
556- } else {
557- // TODO: please keep the below code and move
558- // it outside the if
559-
560- // select all the scripts from contet div and
561- const scripts = contentDiv . querySelectorAll ( 'script' ) ;
562- scripts . forEach ( ( script ) => {
563- const newScript = document . createElement ( 'script' ) ;
564- newScript . src = `${ Constants . PUBLIC_URL_ORIGIN } ${ script . getAttribute ( 'src' ) } ` ;
565- newScript . defer = true ;
566- contentDiv . appendChild ( newScript ) ;
567- } ) ;
568- }
547+ // select all the scripts from contet div and
548+ const scripts = contentDiv . querySelectorAll ( 'script' ) ;
549+ scripts . forEach ( ( script ) => {
550+ const newScript = document . createElement ( 'script' ) ;
551+ newScript . src = `${ Constants . PUBLIC_URL_ORIGIN } ${ script . getAttribute ( 'src' ) } ` ;
552+ newScript . defer = true ;
553+ contentDiv . appendChild ( newScript ) ;
554+ } ) ;
569555
570556 shadowRoot . appendChild ( contentDiv ) ;
571557 const body = document . querySelector ( 'body' ) ;
0 commit comments