slides/ani/asset/md2reveal-0.1.7/plugin/notes-server/notes.html [284:392]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - currentSlide = document.createElement( 'iframe' ); currentSlide.setAttribute( 'width', 1280 ); currentSlide.setAttribute( 'height', 1024 ); currentSlide.setAttribute( 'src', currentURL ); document.querySelector( '#current-slide' ).appendChild( currentSlide ); upcomingSlide = document.createElement( 'iframe' ); upcomingSlide.setAttribute( 'width', 640 ); upcomingSlide.setAttribute( 'height', 512 ); upcomingSlide.setAttribute( 'src', upcomingURL ); document.querySelector( '#upcoming-slide' ).appendChild( upcomingSlide ); } /** * Setup the notes UI. */ function setupNotes() { notes = document.querySelector( '.speaker-controls-notes' ); notesValue = document.querySelector( '.speaker-controls-notes .value' ); } /** * Create the timer and clock and start updating them * at an interval. */ function setupTimer() { var start = new Date(), timeEl = document.querySelector( '.speaker-controls-time' ), clockEl = timeEl.querySelector( '.clock-value' ), hoursEl = timeEl.querySelector( '.hours-value' ), minutesEl = timeEl.querySelector( '.minutes-value' ), secondsEl = timeEl.querySelector( '.seconds-value' ); function _updateTimer() { var diff, hours, minutes, seconds, now = new Date(); diff = now.getTime() - start.getTime(); hours = Math.floor( diff / ( 1000 * 60 * 60 ) ); minutes = Math.floor( ( diff / ( 1000 * 60 ) ) % 60 ); seconds = Math.floor( ( diff / 1000 ) % 60 ); clockEl.innerHTML = now.toLocaleTimeString( 'en-US', { hour12: true, hour: '2-digit', minute:'2-digit' } ); hoursEl.innerHTML = zeroPadInteger( hours ); hoursEl.className = hours > 0 ? '' : 'mute'; minutesEl.innerHTML = ':' + zeroPadInteger( minutes ); minutesEl.className = minutes > 0 ? '' : 'mute'; secondsEl.innerHTML = ':' + zeroPadInteger( seconds ); } // Update once directly _updateTimer(); // Then update every second setInterval( _updateTimer, 1000 ); timeEl.addEventListener( 'click', function() { start = new Date(); _updateTimer(); return false; } ); } function zeroPadInteger( num ) { var str = '00' + parseInt( num ); return str.substring( str.length - 2 ); } /** * Limits the frequency at which a function can be called. */ function debounce( fn, ms ) { var lastTime = 0, timeout; return function() { var args = arguments; var context = this; clearTimeout( timeout ); var timeSinceLastCall = Date.now() - lastTime; if( timeSinceLastCall > ms ) { fn.apply( context, args ); lastTime = Date.now(); } else { timeout = setTimeout( function() { fn.apply( context, args ); lastTime = Date.now(); }, ms - timeSinceLastCall ); } } } })(); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - slides/custom/asset/md2reveal-0.1.7/plugin/notes/notes.html [294:402]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - currentSlide = document.createElement( 'iframe' ); currentSlide.setAttribute( 'width', 1280 ); currentSlide.setAttribute( 'height', 1024 ); currentSlide.setAttribute( 'src', currentURL ); document.querySelector( '#current-slide' ).appendChild( currentSlide ); upcomingSlide = document.createElement( 'iframe' ); upcomingSlide.setAttribute( 'width', 640 ); upcomingSlide.setAttribute( 'height', 512 ); upcomingSlide.setAttribute( 'src', upcomingURL ); document.querySelector( '#upcoming-slide' ).appendChild( upcomingSlide ); } /** * Setup the notes UI. */ function setupNotes() { notes = document.querySelector( '.speaker-controls-notes' ); notesValue = document.querySelector( '.speaker-controls-notes .value' ); } /** * Create the timer and clock and start updating them * at an interval. */ function setupTimer() { var start = new Date(), timeEl = document.querySelector( '.speaker-controls-time' ), clockEl = timeEl.querySelector( '.clock-value' ), hoursEl = timeEl.querySelector( '.hours-value' ), minutesEl = timeEl.querySelector( '.minutes-value' ), secondsEl = timeEl.querySelector( '.seconds-value' ); function _updateTimer() { var diff, hours, minutes, seconds, now = new Date(); diff = now.getTime() - start.getTime(); hours = Math.floor( diff / ( 1000 * 60 * 60 ) ); minutes = Math.floor( ( diff / ( 1000 * 60 ) ) % 60 ); seconds = Math.floor( ( diff / 1000 ) % 60 ); clockEl.innerHTML = now.toLocaleTimeString( 'en-US', { hour12: true, hour: '2-digit', minute:'2-digit' } ); hoursEl.innerHTML = zeroPadInteger( hours ); hoursEl.className = hours > 0 ? '' : 'mute'; minutesEl.innerHTML = ':' + zeroPadInteger( minutes ); minutesEl.className = minutes > 0 ? '' : 'mute'; secondsEl.innerHTML = ':' + zeroPadInteger( seconds ); } // Update once directly _updateTimer(); // Then update every second setInterval( _updateTimer, 1000 ); timeEl.addEventListener( 'click', function() { start = new Date(); _updateTimer(); return false; } ); } function zeroPadInteger( num ) { var str = '00' + parseInt( num ); return str.substring( str.length - 2 ); } /** * Limits the frequency at which a function can be called. */ function debounce( fn, ms ) { var lastTime = 0, timeout; return function() { var args = arguments; var context = this; clearTimeout( timeout ); var timeSinceLastCall = Date.now() - lastTime; if( timeSinceLastCall > ms ) { fn.apply( context, args ); lastTime = Date.now(); } else { timeout = setTimeout( function() { fn.apply( context, args ); lastTime = Date.now(); }, ms - timeSinceLastCall ); } } } })(); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -