1(function($) { 2 3 /* 4 if(typeof PUSH_GLOBAL !== 'undefined') { 5 const countrycode = PUSH_GLOBAL.geo_ip_country; 6 if(countrycode !== 'CA' && countrycode !== 'US') { 7 jQuery("#umggr-wc-splash-modal").hide(); 8 jQuery("#north-american-splash")[0].remove(); 9 jQuery("body").removeClass("-no-overflow"); 10 jQuery("body").addClass("overflow"); // force the page to scroll - removing ".-no-overflow" doesn't work 11 } 12 } 13 */ 14 15 var vh, hh, fh, pc, hbh; 16 17 addEventListener('resize', (event) => { 18 vh = window.innerHeight * .01; 19 document.documentElement.style.setProperty('--vh', `${vh}px`); 20 if ($('.ms-header').length) { 21 hh = $('.ms-header').outerHeight(); 22 document.documentElement.style.setProperty('--hh', `${hh}px`); 23 } 24 if ($('.ms-footer').length) { 25 fh = $('.ms-footer').parent().parent().outerHeight(); 26 document.documentElement.style.setProperty('--fh', `${fh}px`); 27 } 28 if ($('.ms-product-carousel').length) { 29 pc = $('.ms-product-carousel').width(); 30 document.documentElement.style.setProperty('--pc', `${pc}px`); 31 } 32 33 if ($('.mf-hero-b').length) { 34 hbh = $('.mf-hero-b').outerHeight(); 35 document.documentElement.style.setProperty('--hbh', `${hbh}px`); 36 } 37 38 }); 39 40 window.dispatchEvent(new Event('resize')); 41 setTimeout(function() { window.dispatchEvent(new Event('resize')); }, 500); 42 setTimeout(function() { window.dispatchEvent(new Event('resize')); }, 1000); 43 44 45 46 47 $(window).on('scroll', ()=> { 48 var st = $(window).scrollTop(); 49 var wh = window.innerHeight; 50 if (st > hh) { 51 $('.ms-header').addClass('sticky'); 52 } else { 53 $('.ms-header').removeClass('sticky'); 54 } 55 }) 56 57 $('.menu-toggle').on('click', ()=> { 58 $('.menu-toggle').toggleClass('open'); 59 $('body').toggleClass('menu-open'); 60 61 }) 62 63 64 // store - home 65 66 /* 67 68 if ($('#section-home-store-section-blk-two').length) { 69 70 function waitForElement(root, selector, callback) { 71 return new Promise((resolve) => { 72 let element = root.querySelector(selector); 73 if (element) { 74 resolve(element); 75 callback(element); 76 } else { 77 const observer = new MutationObserver((mutations) => { 78 mutations.forEach((mutation) => { 79 if (mutation.type === 'childList') { 80 element = root.querySelector(selector); 81 if (element) { 82 observer.disconnect(); 83 resolve(element); 84 callback(element); 85 } 86 } 87 }); 88 }); 89 observer.observe(root, { childList: true, subtree: true }); 90 91 } 92 }); 93 } 94 95 const myElement = waitForElement(document, '#section-home-store-section-blk-two umg-slider', (umgSlider) => { 96 console.log('umgSlider: ', umgSlider); 97 const mySlides = umgSlider.querySelectorAll('umg-slide'); 98 mySlides.forEach((mySlide)=> { 99 const myButtons = mySlide.querySelectorAll('umg-button'); 100 myButtons.forEach((myButton)=> { 101 myButton.textContent = "Pre-Order Now"; 102 }); 103 }); 104 105 }); 106 } 107 108 */ 109 110
111 $(".ms-product-carousel").slick({ 112 infinite: true, 113 dots: true, 114 arrows: false, 115 slidesToShow: 3, 116 slidesToScroll: 1, 117 autoplay: false, 118 autoplaySpeed: 2000, 119 appendDots: $('.slick-slider-dots'), 120 responsive: [ 121 { 122 breakpoint: 991, 123 settings: { 124 slidesToShow: 2, 125 }, 126 }, 127 { 128 breakpoint: 768, 129 settings: { 130 slidesToShow: 2, 131 }, 132 }, 133 ], 134 }); 135 136 $('.product-prev').on('click', function(e) { 137 e.preventDefault(); 138 $(".ms-product-carousel").slick('slickPrev'); 139 }); 140 $('.product-next').on('click', function(e) { 141 e.preventDefault(); 142 $(".ms-product-carousel").slick('slickNext'); 143 }); 144 145 // video 146 147 if ($('#section-home-video-section-blk-two').length) { 148 var top_video_title = $.trim($('#topItemVideo').text()); 149 $('#topItemVideo').after('<div class="pg_topitemvideo__title">' + top_video_title + '</div>'); 150 151 // console.log($("#topItemVideo")[0].shadowRoot.innerHTML); 152 153 154 } 155 156 // video 157 158 // console.log(window.youtubeready); 159 160 var player; 161 162 if ($('.ms-featured-video').length) { 163 var video_playing = false; 164 $('.ms-featured-video a').on('click', function(e) { 165 e.preventDefault(); 166 167 168 /* 169 $('.ms-featured-video').addClass('video-playing'); 170 var url = $('.ms-featured-video iframe').prop('src') + '?autoplay=1&loop=1&rel=0&wmode=transparent'; 171 $('.ms-featured-video iframe').prop('src', url); 172 */ 173 174 $('.ms-featured-video').addClass('video-playing'); 175 $('.ms-featured-video a').remove(); 176 var ytid = $('.ms-featured-video').data('ytid'); 177 178 player = new YT.Player('player', { 179 height: '390', 180 width: '640', 181 videoId: ytid, 182 playerVars: { 183 'playsinline': 1, 184 }, 185 events: { 186 'onReady': onPlayerReady, 187 'onStateChange': onPlayerStateChange 188 } 189 }); 190 191 function onPlayerReady(event) { 192 event.target.playVideo(); 193 } 194 var done = false; 195 function onPlayerStateChange(event) { 196 if (event.data == YT.PlayerState.PLAYING && !done) { 197 setTimeout(stopVideo, 6000); 198 done = true; 199 } 200 } 201 function stopVideo() { 202 player.stopVideo(); 203 } 204 205 206 207 }); 208 $('.ms-page-video-grid-inner-item a').on('click', function(e) { 209 e.preventDefault(); 210 211 var ytid = $(this).data('ytid'); 212 var title = $(this).data('title'); 213 var thumb = $(this).data('thumb'); 214 var url = 'https://www.youtube.com/embed/' + ytid + '?autoplay=1&loop=1&rel=0&wmode=transparent'; 215 216 /* 217 $('.ms-featured-video').addClass('video-playing'); 218 $('.ms-featured-video iframe').prop('src', url); 219 $('.ms-page-video-featured-inner h2').text(title); 220 $('.ms-featured-video a').css({ '--bg-image': 'url(' + thumb + ')' }); 221 var hi = $('.ms-page-header-inner').outerHeight(); 222 var st = $('.ms-featured-video').position().top - (hh + hi); 223 $('html,body').animate({ scrollTop: st }, 666); 224 225 document.title = 'Mumford And Sons | Official Site | Video - ' + title; 226 window.history.pushState(document.title, document.title, $(this).attr('href')); 227 */ 228 229 if ($('.ms-featured-video iframe').length) { 230 $('.ms-featured-video iframe').remove(); 231 $('.ms-featured-video').prepend('<div id="player"></div>'); 232 } 233 234 $('.ms-featured-video').addClass('video-playing'); 235 player = new YT.Player('player', { 236 height: '390', 237 width: '640', 238 videoId: ytid, 239 playerVars: { 240 'playsinline': 1, 241 }, 242 events: { 243 'onReady': onPlayerReadyItem, 244 'onStateChange': onPlayerStateChangeItem 245 } 246 }); 247 248 function onPlayerReadyItem(event) { 249 event.target.playVideo(); 250 } 251 var done = false;
252 function onPlayerStateChangeItem(event) { 253 if (event.data == YT.PlayerState.PLAYING && !done) { 254 setTimeout(stopVideoItem, 6000); 255 done = true; 256 } 257 } 258 function stopVideo() { 259 player.stopVideoItem(); 260 } 261 262 $('.ms-page-video-featured-inner h2').text(title); 263 264 var hi = $('.ms-page-header-inner').outerHeight(); 265 var st = $('.ms-featured-video').position().top - (hh + hi); 266 $('html,body').animate({ scrollTop: st }, 666); 267 268 document.title = 'Mumford And Sons | Official Site | Video - ' + title; 269 window.history.pushState(document.title, document.title, $(this).attr('href')); 270 271 }); 272 } 273 274 275 // newsletter sign up 276 277 $('#ae-cform-input-reg-email-1').attr('placeholder', 'EMAIL ADDRESS *'); 278 $('#ae-cform-input-reg-country-1 option:contains("Select...")').text('COUNTRY'); 279 $('#ae-cform-input-reg-mobilephone-1').attr('placeholder', 'MOBILE NUMBER'); 280 281 $('#cookie-choices').on('click', function(e) { 282 e.preventDefault(); 283 $('#cpra_button').trigger('click'); 284 }); 285 286 // seated 287 288 String.prototype.replaceAll = function(search, replace) { 289 if (replace === undefined) { 290 return this.toString(); 291 } 292 return this.split(search).join(replace); 293 } 294 295 function fixDates() { 296 console.log('fixing dates'); 297 setTimeout(function() { 298 $('.seated-event-date-cell').each(function(index) { 299 var contents = $(this).text(); 300 301 console.log( contents ); 302 contents = contents.replaceAll(', 2025', ''); 303 contents = contents.replaceAll(', 2026', ''); 304 contents = contents.replaceAll(', 2027', ''); 305 contents = contents.replaceAll(', 2028', ''); 306 $(this).text(contents); 307 }); 308 }, 1000); 309 310 } 311 312 function fixSeated() { 313 setTimeout(function() { 314 $('.seated-event-row ').each(function(index) { 315 var datecell = $(this).find('.seated-event-date-cell'); 316 var venuecell = $(this).find('.seated-event-venue-name'); 317 var locationcell = $(this).find('.seated-event-venue-location'); 318 319 if (datecell) { 320 var contents = datecell.text(); 321 contents = contents.replaceAll(', 2025', ''); 322 contents = contents.replaceAll(', 2026', ''); 323 contents = contents.replaceAll(', 2027', ''); 324 contents = contents.replaceAll(', 2028', ''); 325 datecell.text(contents); 326 327 // venuecellcontents = venuecell.text(); 328 // locationcellcontents = locationcell.text(); 329 // venuecell.text(venuecellcontents + ' (' + locationcellcontents + ')'); 330 // locationcell.text(''); 331 } 332 }); 333 334 }, 666); 335 } 336 337 var ssi = setInterval( function() { 338 console.log('checking'); 339 if ($('#seated-55fdf2c0').html() != '') { 340 fixSeated(); 341 clearInterval(ssi); 342 } 343 }, 333); 344 345 setTimeout(function() { 346 $('.ms-preloader').fadeOut(666); 347 }, 666); 348 349 350})( jQuery );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.