1 2jQuery( function ( $ ) { 3 'use strict' ; 4 5 try { 6 $( document.body ).on( 'lty-countdown-timer-init' , function ( ) { 7 var $countdown_timer = $( '.lty-lottery-countdown-timer' ) ; 8 9 if ( $countdown_timer.length ) { 10 11 $( '.lty-lottery-countdown-timer' ).each( function ( ) { 12 13 var $timer = $( this ) ; 14 15 var interval = setInterval( function ( ) { 16 17 var d = new Date( ) , 18 utc = d.getTime() + ( d.getTimezoneOffset() * 60000 ) , 19 now = new Date( utc ) , 20 end_date = new Date( $timer.data( 'time' ) ).getTime( ) , 21 distance = end_date - now.getTime() ; 22 23 if ( distance < 0 ) { 24 //Clear interval. 25 clearInterval( interval ) ; 26 //After completed the timer reload the page. 27 window.location.reload( true ) ; 28 return ; 29 } 30 31 var days = Math.floor( distance / ( 1000 * 60 * 60 * 24 ) ) ; 32 var hours = Math.floor( ( distance % ( 1000 * 60 * 60 * 24 ) ) / ( 1000 * 60 * 60 ) ) ; 33 var minutes = Math.floor( ( distance % ( 1000 * 60 * 60 ) ) / ( 1000 * 60 ) ) ; 34 var seconds = Math.floor( ( distance % ( 1000 * 60 ) ) / 1000 ) ; 35 36 $timer.find( '#lty_lottery_days' ).html( days ) ; 37 $timer.find( '#lty_lottery_hours' ).html( hours ) ; 38 $timer.find( '#lty_lottery_minutes' ).html( minutes ) ; 39 $timer.find( '#lty_lottery_seconds' ).html( seconds ) ; 40 41 var $data = { days : days , hours : hours , minutes : minutes , seconds : seconds } ; 42 $( document.body ).trigger( 'lty-countdown-timer-interval' , [ $data , distance ] ) ; 43 44 } , 1000 ) ; 45 } ) ; 46 } 47 } ) ; 48 $( document.body ).trigger( 'lty-countdown-timer-init' ) ; 49 } catch ( err ) { 50 window.console.log( err ) ; 51 } 52} ) ;
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.