plugin/notes-server/client.js
function post() {

		var slideElement = Reveal.getCurrentSlide(),
			notesElement = slideElement.querySelector( 'aside.notes' );

		var messageData = {
			notes: '',
			markdown: false,
			socketId: socketId,
			state: Reveal.getState()
		};

		// Look for notes defined in a slide attribute
		if( slideElement.hasAttribute( 'data-notes' ) ) {
			messageData.notes = slideElement.getAttribute( 'data-notes' );
		}

		// Look for notes defined in an aside element
		if( notesElement ) {
			messageData.notes = notesElement.innerHTML;
			messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string';
		}

		socket.emit( 'statechanged', messageData );

	}
function post() {

		var slideElement = Reveal.getCurrentSlide(),
			notesElement = slideElement.querySelector( 'aside.notes' );

		var messageData = {
			notes: '',
			markdown: false,
			socketId: socketId,
			state: Reveal.getState()
		};

		// Look for notes defined in a slide attribute
		if( slideElement.hasAttribute( 'data-notes' ) ) {
			messageData.notes = slideElement.getAttribute( 'data-notes' );
		}

		// Look for notes defined in an aside element
		if( notesElement ) {
			messageData.notes = notesElement.innerHTML;
			messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string';
		}

		socket.emit( 'statechanged', messageData );

	}
function post ( ) { var slideElement = Reveal . getCurrentSlide ( ) , notesElement = slideElement . querySelector ( 'aside.notes' ) ; var messageData = { notes : '' , markdown : false , socketId : socketId , state : Reveal . getState ( ) } ; // Look for notes defined in a slide attribute if ( slideElement . hasAttribute ( 'data-notes' ) ) { messageData . notes = slideElement . getAttribute ( 'data-notes' ) ; } // Look for notes defined in an aside element if ( notesElement ) { messageData . notes = notesElement . innerHTML ; messageData . markdown = typeof notesElement . getAttribute ( 'data-markdown' ) === 'string' ; } socket . emit ( 'statechanged' , messageData ) ; }
Posts the current slide data to the notes window
Posts the current slide data to the notes window