1(function($){ 2 // Lang 3 var lang = $('html').attr('lang'); 4 5 // Set variable for different language 6 var previous = "previous"; 7 var next = "next"; 8 if(lang === 'fr') { 9 previous = "précédent"; 10 next = "suivant"; 11 } 12 var $prev = `<button type="button" class="arrow arrow-left slick-arrow" tabindex="0"><span class="visuallyhidden">${previous}</span><span class="icon-arrow-left"></span></button>`; 13 var $next =`<button type="button" class="arrow arrow-right slick-arrow" tabindex="0"><span class="visuallyhidden">${next}</span><span class="icon-arrow-right"></span></button>`; 14 var customPaging = function(slider, i) { 15 return $('<button type="button" />').html('<span class="visuallyhidden">Element ' + (i + 1) + '</span>'); 16 }; 17 18 $('.parag-content-carousel__slides').slick({ 19 centerMode: true, 20 mobileFirst: true, 21 swipeToSlide: true, 22 infinite: true, 23 variableWidth: true, 24 prevArrow: $prev, 25 nextArrow: $next, 26 draggable: false, 27 focusOnChange: true, 28 slidesToShow: 3, 29 slidesToScroll: 3, 30 customPaging: customPaging, 31 speed: 150, 32 }); 33 $('.parag-gallery__slides').slick({ 34 centerMode: true, 35 variableWidth: true, 36 swipeToSlide: true, 37 infinite: true, 38 dots: true, 39 appendDots: '.slick-dots-wrapper', 40 prevArrow: $prev, 41 nextArrow: $next, 42 draggable: false, 43 focusOnChange: true, 44 customPaging: customPaging, 45 speed: 150, 46 }); 47 48 mejs.i18n.language($('html').attr('lang')); 49 $('.parag-video__iframe:not(.mejs__video)').mediaelementplayer({ 50 videoWidth: '100%', 51 videoHeight: '100%', 52 enableAutosize: true, 53 alwaysShowControls: true, 54 success: function(media, node) { 55 $(media).children().attr('tabindex', '-1'); 56 } 57 }); 58 59 $('.lang-switcher').find('.is-active').hide(); 60 61 // Hero video on home page 62 var heroVideo = $('.header-media'); 63 if (heroVideo.length > 0) { 64 var videoControl = $('.hero-video-control'); 65 var videoLabel = videoControl.find('.label'); 66 var stopLabel = lang === 'fr' ? 'Mettre en pause la vidéo' : 'Stop video'; 67 var playLabel = lang === 'fr' ? 'Jouer la vidéo' : 'Play video'; 68 videoLabel.text(stopLabel); 69 70 videoControl.on('click', function() { 71 if ($(this).hasClass('stop')) { 72 heroVideo.removeAttr('autoplay'); 73 heroVideo.get(0).pause(); 74 $(this).removeClass('stop'); 75 videoLabel.text(playLabel); 76 } else { 77 heroVideo.get(0).play(); 78 $(this).addClass('stop'); 79 videoLabel.text(stopLabel); 80 } 81 }); 82 } 83 84 })(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.