1var fullscreen=function(){var doc=document;var html=doc.documentElement;var body=doc.body;var mainNav=doc.querySelector('.main-nav');var target=doc.querySelector('.fullscreen');var sections=doc.querySelectorAll('.fullscreen__section');var buttons;var throttle=false;var scrolled=0;var count=sections.length;var max=count-1;var index=0;var start;var end;var timeout;var _={};_.clearThrottle=function(){throttle=true;timeout=setTimeout(function(){throttle=false;scrolled=0;},1000);};_.triggerResize=function(){var evt=window.document.createEvent('UIEvents');evt.initUIEvent('resize',true,false,window,0);window.dispatchEvent(evt);};_.getScroll=function(){var scroll=body.scrollTop||html.scrollTop;return scroll;};_.buildNav=function(){var nav=document.createElement('div');nav.classList.add('fullscreen__nav');for(var i=0;i<count+1;i+=1){nav.innerHTML+='<button class="fullscreen__button"></button>';} 2target.appendChild(nav);buttons=doc.querySelectorAll('.fullscreen__button');};_.updateNav=function(){for(var i=0;i<buttons.length;i+=1){if(i===index){buttons[i].classList.add('fullscreen__button--active');}else{buttons[i].classList.remove('fullscreen__button--active');}}};_.deactivateAll=function(){for(var i=0;i<max;i+=1){sections[i].classList.add('fullscreen__section--inactive');}};_.previous=function(){if(index>0&&_.getScroll()===0){index-=1;sections[index].classList.remove('fullscreen__section--inactive');target.classList.remove('fullscreen--inactive');html.classList.add('noscroll');setTimeout(function(){if(!target.classList.contains('fullscreen--inactive')){mainNav.classList.add('transparent');}},1000);_.updateNav();}};_.next=function(){if(index<max&&_.getScroll()===0){sections[index].classList.add('fullscreen__section--inactive');index+=1;_.updateNav();}else if(index===max){_.end();}};_.end=function(){index=count;target.classList.add('fullscreen--inactive');mainNav.classList.remove('transparent');setTimeout(function(){if(target.classList.contains('fullscreen--inactive')){html.classList.remove('noscroll');_.triggerResize();_.deactivateAll();}},1000);_.updateNav();};_.onWheel=function(e){if(_.getScroll()===0){var move=e.deltaY;scrolled+=move;if(!throttle&&move<0&&!html.classList.contains('noscroll')){_.clearThrottle();_.previous();}else if(!throttle&&Math.abs(scrolled)>=240){_.clearThrottle();if(move<0){_.previous();}else if(move>0){_.next();}}}};_.onKeydown=function(e){if(!throttle){_.clearThrottle();switch(e.which){case 38:_.previous();break;case 40:_.next();break;}}};_.onTouchstart=function(e){if(_.getScroll()===0){start=e.touches[0].pageY;doc.addEventListener('touchmove',_.onTouchmove);doc.addEventListener('touchend',_.onTouchend);}};_.onTouchmove=function(e){end=e.touches[0].pageY;var distance=end-start;if(distance>30){if(!throttle){_.clearThrottle();_.previous();}} 3if(distance<-30){if(!throttle){_.clearThrottle();_.next();}} 4if(html.classList.contains('noscroll')||(!html.classList.contains('noscroll')&&distance>0)){e.preventDefault();}};_.onTouchend=function(e){doc.removeEventListener('touchmove',_.onTouchmove);doc.removeEventListener('touchend',_.onTouchend);};_.onButton=function(e){var goto=Array.prototype.indexOf.call(buttons,this);if(goto!==index){if(goto===count){_.end();}else if(goto<index){while(goto<index){_.previous();}}else{while(goto>index){_.next();}}}};_.init=function(){html.classList.add('noscroll');_.buildNav();_.updateNav();doc.addEventListener('wheel',_.onWheel);doc.addEventListener('keydown',_.onKeydown);doc.addEventListener('touchstart',_.onTouchstart);for(var i=0;i<buttons.length;i+=1){buttons[i].addEventListener('click',_.onButton);} 5window.addEventListener('touchmove',function(){});};if(document.querySelectorAll('.fullscreen').length){_.init();}}();
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.