PageSourceSearch

https://neuropace.com/wp-content/plugins/neuropace-carousel/assets…=0.1.3.pagespeed.jm.CladMAx0zj.js

js neuropace.com collected 2026-09-24 10:33:50 UTC 3,154 bytes, 1 lines download raw bytes

1if(window.NodeList&&!NodeList.prototype.forEach){NodeList.prototype.forEach=Array.prototype.forEach;}if(!String.prototype.includes){String.prototype.includes=function(search,start){'use strict';if(search instanceof RegExp){throw TypeError('first argument must not be a RegExp');}if(start===undefined){start=0;}return this.indexOf(search,start)!==-1;};}(function($){function init(){removeEmptyP();checkFirstSlide();setupCarousels();setupButtonRoles();$(document).on('click','.neuropace-carousel--play-button',playVideo);window.addEventListener('resize',function(){var iframe=document.querySelector('.neuropace-video-frame');if(!iframe)return;$(iframe).height($(iframe).width()*0.5625);});}function removeEmptyP(){var paragraphs=document.querySelectorAll('.neuropace-carousel p');if(!paragraphs.length)return;paragraphs.forEach(function(p){if(p.innerHTML)return;p.parentNode.removeChild(p);});}function checkFirstSlide(){var wrappers=document.querySelectorAll('.neuropace-carousel-wrapper');if(!wrappers.length)return;wrappers.forEach(function(wrapper){var slides=wrapper.querySelectorAll('.neuropace-carousel-item');if(!slides.length)return;
1var contentButton=slides[0].querySelector('.neuropace-carousel-content-wrapper .neuropace-carousel-button');if(contentButton){wrapper.classList.add('has-content-button');}});}function setupButtonRoles(){var buttons=document.querySelectorAll('.neuropace-carousel button');if(!buttons.length)return;buttons.forEach(function(button){if(!button.getAttribute('role')||'button'!==button.getAttribute('role')){button.setAttribute('role','button');}});}function setupCarousels(){var els=document.querySelectorAll('.neuropace-carousel');if(!els.length)return;els.forEach(function(el){if(el.firstChild.tagName&&'br'===el.firstChild.tagName.toLowerCase()){el.removeChild(el.querySelector('br'));}var slider=tns({container:el,items:1,autoplay:false,loop:false,controlsPosition:'bottom',controlsText:["",""]});slider.events.on('indexChanged',onIndexChanged);});}function onIndexChanged(slider){var items=slider.container.querySelectorAll('.neuropace-carousel-item');if(!items.length)return;items.forEach(function(item){var contentButton;var wrapper;if(!item.classList.contains('tns-slide-active')){stopVideo(item);}else{contentButton=item.querySelector('.neuropace-carousel-content-wrapper .neuropace-carousel-button');wrapper=item.parentNode.parentNode.parentNode.parentNode.parentNode.classList;if(contentButton&&wrapper){wrapper.add('has-content-button');}else{wrapper.remove('has-content-button');}}});}function playVideo(){var parentNode=this.parentNode.parentNode.parentNode.parentNode;var videoUrl=parentNode.dataset.videoUrl;if(!videoUrl||videoUrl==='')return;var iframe=parentNode.querySelector('.neuropace-video-frame');if(!iframe)return;iframe.classList.add('neuropace-carousel-video--is-playing');iframe.src=videoUrl;}function stopVideo(slide){var iframe=slide.querySelector('.neuropace-video-frame');if(!iframe)return;iframe.classList.remove('neuropace-carousel-video--is-playing');iframe.src='';}if(neuropaceCarouselData.isVcEditable){window.addEventListener('load',function(e){init();});}else{init();}})(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.