PageSourceSearch

https://www.thejohnfrostschool.co.uk/_site/js/ecocycle.v2.min.js?cache=01012021

js thejohnfrostschool.co.uk collected 2026-10-03 22:27:36 UTC 2,456 bytes, 1 lines download raw bytes

1var ecoCycle=function(a){function l(e,n){t(e,function(){1<c&&a.timeout&&function(){d=setInterval(function(){s(n),t(u,function(){})},a.timeout)}()})}function s(e){"prev"==e?0==u?u=(Math.ceil(c/a.groupBy)-1)*a.groupBy:u-=a.groupBy:u>=c-a.groupBy?u=0:u+=a.groupBy}function t(o,e){function n(e,n){for(var t=0;t<c;t++)null!=e[t]&&e[t].classList.remove("active");switch(n){case"dots":null!=e[o/a.groupBy]&&e[o/a.groupBy].classList.add("active");break;default:for(t=o;t<o+a.groupBy;t++)null!=e[t]&&e[t].classList.add("active")}}a.onChange(o,c-1,a.timeout),null!=r[o]&&imgLoadCheck(r[o].querySelector("[data-src]"),!1,function(){}),n(r,""),a.dots&&n(a.dotsContainer.children,"dots"),e()}var o="ecocycle";this.defaults={childNodes:"",el:"",dots:!1,dotsChild:"<span></span>",dotsContainer:o+".__dots",groupBy:1,nav:!1,navChild:["<button>Prev</button>","<button>Next</button>"],navContainer:o+".__nav",onChange:function(e,n,t){},pauseOnHover:!1,shuffle:!1,timeout:7e3};var i=null!=document.querySelector(a.el);if(this.init=function(){function e(e,n,t,o){var a,i,r=(a=t,(i=document.createElement("div")).innerHTML=a.trim(),i.firstChild);r.addEventListener("click",function(){clearInterval(d),d=null,"dots"==e?u=o:s(e),l(u,"next")},!1),n.appendChild(r)}if(i){a.shuffle&&function(e){for(var n=document.createDocumentFragment();e.length;)n.appendChild(e[Math.floor(Math.random()*e.length)]);a.el.appendChild(n)}(r),a.el.classList.add(o);for(var n=0;n<c;n++)r[n].classList.add(o+"__item");if(a.nav&&(a.navContainer=document.querySelector(a.navContainer),1<c&&(a.navContainer.classList.add(o+"__nav"),e("prev",a.navContainer,a.navChild[0],""),e("next",a.navContainer,a.navChild[1],""))),a.dots){a.dotsContainer=document.querySelector(a.dotsContainer),a.dotsContainer.classList.add(o+"__dots");for(n=0;n<c;n+=a.groupBy)e("dots",a.dotsContainer,a.dotsChild,n)}a.pauseOnHover&&(a.el.addEventListener("mouseenter",function(){clearInterval(d),d=null}),a.el.addEventListener("mouseleave",function(){l(u,"next")})),l(u,"next")}},this.destroy=function(){if(i){clearInterval(d),d=null,a.el.classList.remove(o);for(var e=0;e<c;e++)r[e].classList.remove(o+"__item"),r[e].classList.remove("active");a.navContainer.innerHTML="",a.dotsContainer.innerHTML=""}},i){for(var e in a)a.hasOwnProperty(e)&&(this.defaults[e]=a[e]);(a=this.defaults).el=document.querySelector(a.el);var d,u=0,r=a.el.children;""!=a.childNodes&&(a.shuffle=!1,r=a.el.querySelectorAll(a.childNodes));var c=r.length}};

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.