@@ -8,13 +8,10 @@ define([
88 'use strict' ;
99
1010 return function ( originalWidget ) {
11- /**
12- * Check if the video source URL is from a supported platform
13- * @param {string } url - The video source URL
14- * @returns {boolean } - True if the URL is from YouTube, YouTube-nocookie, or Vimeo
15- */
1611 function isSupportedVideoPlatform ( url ) {
17- if ( ! url ) return false ;
12+ if ( ! url ) {
13+ return false ;
14+ }
1815
1916 // Regex patterns for supported video platforms
2017 const youtubePattern = / ^ h t t p s ? : \/ \/ ( w w w \. ) ? ( y o u t u b e \. c o m | y o u t u \. b e ) \/ / i;
@@ -28,7 +25,6 @@ define([
2825
2926 return function ( config , element ) {
3027 const videoElement = element [ 0 ] . querySelector ( '[data-background-type=video]' ) ;
31- console . log ( 'videoElement' , videoElement ) ;
3228 const blockVideoConsentConfig = window . cookiebotConfig && window . cookiebotConfig . blockVideosUntilConsent ;
3329 const videoSrc = videoElement . getAttribute ( 'data-video-src' ) ;
3430 const cookieblockSrc = videoElement . getAttribute ( 'data-cookieblock-src' ) ;
@@ -46,7 +42,7 @@ define([
4642 addEventListener ( 'CookiebotOnLoad' , sliderVideoBlocker ) ;
4743
4844 function sliderVideoBlocker ( ) {
49- if ( previousStatus === 'blocked' && ! Cookiebot ?. consent ?. marketing ) {
45+ if ( previousStatus === 'blocked' && ( ! Cookiebot ?. consent ?. marketing ) ) {
5046 return ;
5147 }
5248
0 commit comments