1jQuery(function ($) { 2 "use strict"; 3 var iSermons = window.iSermons || {}; 4 iSermons.MH = function () { 5 $('.equah').each(function () { 6 $(this).find('.equah-item').matchHeight(); 7 }); 8 }; 9 iSermons.MH1 = function () { 10 $('.equah1').each(function () { 11 $(this).find('.equah-item1').matchHeight(); 12 }); 13 }; 14 15 $(document).ready(function () { 16 $('.isermons-sermons-grid,.isermons-tax-list').each(function () { 17 let images = $(this).find('.isermons-term-image').length; 18 if (images <= 0) { 19 $(this).addClass('isermons-nomedia-terms'); 20 } 21 }); 22 23 $('.isermons-download').on('click', function (event) { 24 event.preventDefault(); 25 var closest_area = ($(this).hasClass('isermons-btn-download')) ? $(this).closest('.isermons-tabs-panel') : $(this).closest('li.isermons-dl-files'); 26 var val = $(this).attr('data-val'); 27 closest_area.find('.isermons-download-file').val(val); 28 closest_area.find('form').submit(); 29 return false; 30 }); 31 iSermons.MH(); 32 iSermons.MH1(); 33 $('.isermons select').wrap('<div class="imi-select">'); 34 35 36 const players = Plyr.setup('.plyr-player'); 37 players.forEach(player => { 38 // Create a custom button 39 const button = document.createElement('button'); 40 button.classList.add('plyr__control','custom_plyr__control'); 41 button.setAttribute('type', 'button'); 42 button.setAttribute('aria-label', 'Watch Online'); 43 button.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><title>video-player</title><g fill="#ffffff"><path d="M42,5H6a5.006,5.006,0,0,0-5,5V38a5.006,5.006,0,0,0,5,5H42a5.006,5.006,0,0,0,5-5V10A5.006,5.006,0,0,0,42,5ZM32.524,24.852l-13,8A1,1,0,0,1,18,32V16a1,1,0,0,1,1.524-.852l13,8a1,1,0,0,1,0,1.7Z" fill="#ffffff"></path></g></svg>'; 44 45 // Append the button to the controls container if controls are available 46 const controls = player.elements.controls; 47 if (controls) { 48 controls.appendChild(button); 49 } else { 50 // If controls are not found, wait for them to be ready 51 player.on('ready', () => { 52 player.elements.controls.appendChild(button); 53 }); 54 } 55 56 // Add event listener to open the video in a new tab 57 button.addEventListener('click', function() { 58 const iframe = player.elements.container.querySelector('iframe'); 59 const url = iframe ? iframe.getAttribute('src') : null; 60 if (url) { 61 let videoUrl; 62 if (url.includes('youtube.com')) { 63 const videoId = url.split('/embed/')[1].split('?')[0]; 64 videoUrl = `https://www.youtube.com/watch?v=${videoId}`; 65 } else if (url.includes('vimeo.com')) { 66 const videoId = url.split('/video/')[1].split('?')[0]; 67 videoUrl = `https://vimeo.com/${videoId}`; 68 } 69 70 window.open(videoUrl, '_blank'); 71 } else { 72 // 73 } 74 }); 75 }); 76 $('.isermons-pl-va a').on('click', function(){ 77 var AVID = $(this).attr('href'); 78 $(this).parents('.isermons').find(AVID).show(); 79 return false; 80 }); 81 $('.isermons-modal-close').on('click',function(){ 82 $('.isermons-modal-static').hide(); 83 for (var st = 0; st < players.length; st++) { 84 players[st].stop(); 85 } 86 return false; 87 }); 88 89 $('.isermons-dl-files > a').on('click', function (e) { 90 $('ul.isermons-download-files').fadeOut(); 91 $(this).parent('.isermons-dl-files').find('ul.isermons-download-files').fadeToggle(); 92 e.preventDefault(); 93 }); 94 $(document).on('click', function (evt) { 95 if ($(evt.target).closest('.isermons-dl-files').length) { 96 } else { 97 $('ul.isermons-download-files').fadeOut(); 98 } 99 }); 100 $('.isermons-media-box').each(function () { 101 if ($(this).find('img').length) { 102 $(this).css('min-height', '0px'); 103 $(this).find('.isermons-default-placeholder').hide(); 104 } 105 }); 106 }); 107 108 $("ul.isermons-download-files,.isermons-dl-files a.isermons-tip-top-left").on('click', function (e) { 109 e.stopPropagation(); 110 }); 111 112 $('.isermons-toggle-area-trigger').on('click', function (e) { 113 var targetIn = $(this).attr('data-isermons-toggle-in'); 114 var targetOut = $(this).attr('data-isermons-toggle-out'); 115 $(this).parents('.isermons-toggle-area').find(targetOut).slideUp('fast'); 116 $(this).parents('.isermons-toggle-area').find(targetIn).slideDown('slow'); 117 e.preventDefault(); 118 }); 119 120});
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.