@@ -10,7 +10,7 @@ define([
1010 return function ( originalWidget ) {
1111 return function ( config , element ) {
1212 let videoElement = element [ 0 ] . querySelector ( '[data-background-type=video]' ) ;
13- let PreviousStatus = '' ;
13+ let previousStatus = '' ;
1414 if ( ! videoElement ) {
1515 return ;
1616 }
@@ -25,7 +25,7 @@ define([
2525 )
2626
2727 function sliderVideoBlocker ( ) {
28- if ( PreviousStatus === 'blocked' && ! Cookiebot ?. consent ?. marketing ) {
28+ if ( previousStatus === 'blocked' && ! Cookiebot ?. consent ?. marketing ) {
2929 return ;
3030 }
3131
@@ -34,7 +34,7 @@ define([
3434 videoElement . removeAttribute ( 'data-video-src' ) ;
3535 createVideoBlocker ( videoElement ) ;
3636 videoElement . style . display = 'none' ;
37- PreviousStatus = 'blocked' ;
37+ previousStatus = 'blocked' ;
3838 return ;
3939 }
4040
@@ -48,9 +48,8 @@ define([
4848 videoElement . setAttribute ( 'data-video-src' , videoElement . getAttribute ( 'data-cookieblock-src' ) ) ;
4949 videoElement . style . display = 'block' ;
5050 videoElement . removeAttribute ( 'data-cookieblock-src' ) ;
51-
52- // Safely remove the consent blocker element with null checks
53- const customSlide = videoElement . closest ( '.custom-slide-uwt' ) ;
51+
52+ const customSlide = videoElement . closest ( '.slick-slide' ) ;
5453 if ( customSlide ) {
5554 const consentBlocker = customSlide . querySelector ( '.cookieconsent-optout-marketing' ) ;
5655 if ( consentBlocker ) {
@@ -62,25 +61,12 @@ define([
6261 videoElement . appendChild ( viewportElement ) ;
6362 videoBackground ( config , videoElement ) ;
6463 videoElement . style . display = 'block' ;
65- PreviousStatus = 'unblocked' ;
66-
67- if ( $slider . data ( 'afterChangeIsSet' ) ) {
68- return ;
69- }
70-
71- $slider . on ( 'afterChange init' , function ( ) {
72- var videoSlides = $slider [ 0 ] . querySelectorAll ( '.jarallax' ) ;
73-
74- _ . each ( videoSlides , function ( videoSlide ) {
75- videoSlide . jarallax && videoSlide . jarallax . onScroll ( ) ;
76- } ) ;
77- } ) ;
78-
79- $slider . data ( 'afterChangeIsSet' , true ) ;
64+ previousStatus = 'unblocked' ;
8065
66+ this . super ( config , element ) ;
8167 }
8268
8369 sliderVideoBlocker ( ) ;
8470 } ;
8571 } ;
86- } ) ;
72+ } ) ;
0 commit comments