1// remap jQuery to $ 2(function ($) { 3 4 5function videoPopups() { 6 // ---- 7 8 $(".popup-video").magnificPopup({ 9 // disableOn: 700, 10 preloader: true, 11 mainClass: "mfp-fade pm-track-popup", 12 closeOnContentClick: false, 13 closeBtnInside: false, 14 tLoading: "", // remove text from preloader 15 closeMarkup: 16 '<button title="%title%" type="button" class="mfp-close"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px" height="24px" viewBox="0 0 24 24"><g transform="translate(0, 0)"><path fill="#ffffff" d="M19.7,4.3c-0.4-0.4-1-0.4-1.4,0L12,10.6L5.7,4.3c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4l6.3,6.3l-6.3,6.3 c-0.4,0.4-0.4,1,0,1.4C4.5,19.9,4.7,20,5,20s0.5-0.1,0.7-0.3l6.3-6.3l6.3,6.3c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3 c0.4-0.4,0.4-1,0-1.4L13.4,12l6.3-6.3C20.1,5.3,20.1,4.7,19.7,4.3z"></path></g></svg></button>', 17 arrowMarkup: 18 '<button data-yarp title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%">%title%</button>', // markup of an arrow button 19 //closeMarkup 20 // closeOnBgClick: false, 21 disableOn: function() { 22 if( $(window).width() < 600 ) { 23 return false; 24 } 25 return true; 26 }, 27 gallery: { 28 enabled: true, 29 }, 30 type: "iframe", 31 fixedContentPos: true, 32 33 iframe: { 34 // markup: '<div class="mfp-iframe-scaler">'+ 35 // '<div class="mfp-close"></div>'+ 36 // '<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+ 37 // '</div>', // HTML markup of popup, `mfp-close` will be replaced by the close button 38 39 patterns: { 40 youtube: { 41 index: 'youtube.com/', // String that detects type of video (in this case YouTube). Simply via url.indexOf(index). 42 43 id: 'v=', // String that splits URL in a two parts, second part should be %id% 44 // Or null - full URL will be returned 45 // Or a function that should return %id%, for example: 46 // id: function(url) { return 'parsed id'; } 47 48 src: '//www.youtube.com/embed/%id%?autoplay=1&rel=0&modestbranding=1' // URL that will be set as a source for iframe. 49 }, 50 vimeo: { 51 index: 'vimeo.com/', 52 id: '/', 53 src: '//player.vimeo.com/video/%id%?autoplay=1' 54 }, 55 gmaps: { 56 index: '//maps.google.', 57 src: '%id%&output=embed' 58 } 59 60 // you may add here more sources 61 62 }, 63 64 srcAction: 'iframe_src', // Templating object key. First part defines CSS selector, second attribute. "iframe_src" means: find "iframe" and set attribute "src". 65 } 66 }); 67 68 // ---- 69 } 70 71 72$(document).ready(function() { 73 // ----- 74videoPopups(); 75// ----- 76}); 77 78 document.addEventListener('facetwp-loaded', function() { 79 videoPopups(); 80 }); 81 82})(window.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.