1( function( $ ) { 2 // assume only one video is playing at a time 3 var videoPlaying = null; 4 5 function onPlay() { 6 if (videoPlaying && videoPlaying != this) { 7 videoPlaying.pause(); 8 } 9 videoPlaying = this; 10 } 11 12 // init event handler 13 var videos = document.getElementsByClassName("video-bg"); 14 for (var i = 0; i < videos.length; i++) { 15 videos[i].addEventListener("play", onPlay); 16 } 17 18 $('.modal').on('show.bs.modal', function () { 19 $('html').addClass('modal-open'); 20 }); 21 $('.modal').on('hidden.bs.modal', function () { 22 $('html').removeClass('modal-open'); 23 if(videoPlaying){ 24 videoPlaying.pause(); 25 } 26 }); 27 28 var intervalObj = null; 29 var retry = 0; 30 $(document).ready(function () { 31 32 $('.footer-logo').click(function(){ 33 $('html, body').animate({ scrollTop: $('body').offset().top }, 300); 34 }); 35 $('#gofooter').click(function(){ 36 $('html, body').animate({ scrollTop: $('#contact').offset().top }, 300); 37 if (/chrome/.test(navigator.userAgent.toLowerCase())||/chrome/.test(navigator.userAgent.toLowerCase())) { 38 intervalObj = setInterval(scrollDown,1000); 39 } 40 41 }); 42 43 }); 44 45 function scrollDown() { 46 var scrollHeight = document.body.scrollHeight, 47 scrollTop = Math.max(window.pageYOffset, document.documentElement.scrollTop, document.body.scrollTop), 48 innerHeight = window.innerHeight, 49 difference = (scrollHeight - scrollTop) - innerHeight; 50 if (difference > 0) { 51 window.scrollBy(0, difference); 52 if (retry > 0) { 53 retry = 0; 54 } 55 //console.log("scrolling down more"); 56 } else { 57 if (retry >= 0) { 58 //console.log("reached bottom of page; stopping"); 59 clearInterval(intervalObj); 60 } else { 61 //console.log("[apparenty] hit bottom of page; retrying: " + (retry + 1)); 62 retry++; 63 } 64 } 65 } 66 67} )( 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.