1const siteLogo = document.querySelector('.site-logo'); 2const emailLink = document.querySelector('.email-link'); 3let MenuLogo = siteLogo.cloneNode(true); 4let siteEmail = emailLink.cloneNode(true); 5document.querySelector('.mobile-menu').insertAdjacentElement('afterbegin', siteEmail); 6document.querySelector('.mobile-menu').insertAdjacentElement('afterbegin', MenuLogo); 7 8 document.getElementsByClassName('goto-top__icon').onclick=function gotoTop(e) { 9 e.preventDefault(); 10 window.scrollTo( { 11 top: 0, behavior: 'smooth' 12 }); 13 } 14 15const play_audio = document.querySelector('.podcast-play-audio .field--name-body a'); 16if (play_audio) { 17 play_audio.addEventListener('click', function (e) { 18 e.preventDefault(); 19 let href = ''; 20 if(e.srcElement.localName == 'a') { 21 href = e.srcElement.href; 22 } 23 else { 24 href = e.target.parentElement.parentElement.parentElement.href; 25 } 26 const newElem = document.createElement("div"); 27 const crossDiv = document.createElement("div"); 28 const elemChild = document.createElement("div"); 29 const iframeContainer = document.createElement("div"); 30 const ifrm = document.createElement("iframe"); 31 ifrm.setAttribute('src',href); 32 newElem.classList.add("video-modal"); 33 elemChild.classList.add("video-modal-container"); 34 elemChild.classList.add("podcast-audio"); 35 crossDiv.classList.add('search-modal-cross'); 36 iframeContainer.classList.add('iframe-container'); 37 document.body.appendChild(newElem); 38 document.querySelector('.video-modal').append(elemChild); 39 document.querySelector('.video-modal').append(crossDiv); 40 document.querySelector('.video-modal-container').append(iframeContainer); 41 document.querySelector('.iframe-container').append(ifrm); 42 const cross = document.querySelector('.search-modal-cross'); 43 cross.addEventListener('click', function (e) { 44 e.currentTarget.parentNode.remove(); 45 }); 46 }); 47} 48 49const play_video = document.querySelector('.play-audio .field--name-body a'); 50if (play_video) { 51 play_video.addEventListener('click', function (e) { 52 e.preventDefault(); 53 let href = ''; 54 if(e.srcElement.localName == 'a') { 55 href = e.srcElement.href; 56 } 57 else { 58 href = e.target.parentElement.parentElement.parentElement.href; 59 } 60 const newElem = document.createElement("div"); 61 const crossDiv = document.createElement("div"); 62 const elemChild = document.createElement("div"); 63 const iframeContainer = document.createElement("div"); 64 const ifrm = document.createElement("iframe"); 65 ifrm.setAttribute('src',href); 66 newElem.classList.add("video-modal"); 67 elemChild.classList.add("video-modal-container"); 68 elemChild.classList.add("video-iframe"); 69 crossDiv.classList.add('search-modal-cross'); 70 iframeContainer.classList.add('iframe-container'); 71 document.body.appendChild(newElem); 72 document.querySelector('.video-modal').append(elemChild); 73 document.querySelector('.video-modal').append(crossDiv); 74 document.querySelector('.video-modal-container').append(iframeContainer); 75 document.querySelector('.iframe-container').append(ifrm); 76 const cross = document.querySelector('.search-modal-cross'); 77 cross.addEventListener('click', function (e) { 78 e.currentTarget.parentNode.remove(); 79 }); 80 }); 81} 82const play_video_case = document.querySelectorAll('.play-video-case a'); 83if (play_video_case) { 84 play_video_case.forEach(function(video) { 85 video.addEventListener('click', function (e) { 86 e.preventDefault(); 87 let href = ''; 88 if(e.srcElement.localName == 'span') { 89 href = e.target.parentElement.href; 90 } 91 else { 92 href = e.target.parentElement.parentElement.href; 93 } 94 const newElem = document.createElement("div"); 95 const crossDiv = document.createElement("div"); 96 const elemChild = document.createElement("div"); 97 const iframeContainer = document.createElement("div"); 98 const ifrm = document.createElement("iframe"); 99 ifrm.setAttribute('src',href); 100 newElem.classList.add("video-modal"); 101 elemChild.classList.add("video-modal-container"); 102 elemChild.classList.add("video-iframe"); 103 crossDiv.classList.add('search-modal-cross');
104 iframeContainer.classList.add('iframe-container'); 105 document.body.appendChild(newElem); 106 document.querySelector('.video-modal').append(elemChild); 107 document.querySelector('.video-modal').append(crossDiv); 108 document.querySelector('.video-modal-container').append(iframeContainer); 109 document.querySelector('.iframe-container').append(ifrm); 110 const cross = document.querySelector('.search-modal-cross'); 111 cross.addEventListener('click', function (e) { 112 e.currentTarget.parentNode.remove(); 113 }); 114 }); 115 }); 116} 117(function ($) { 118 Drupal.behaviors.mymodule = { 119 attach: function (context, settings) { 120 121 } 122 }; 123}(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.