Sha256: 60aa8a461981a47a4cfe2cb434cc117857fda3f3f5165c4b61cf34224f57a1e2

Contents?: true

Size: 1.37 KB

Versions: 60

Compression:

Stored size: 1.37 KB

Contents

(function() {
	// Don't emit events from inside of notes windows
	if ( window.location.search.match( /receiver/gi ) ) { return; }

	var multiplex = Reveal.getConfig().multiplex;

	var socket = io.connect(multiplex.url);

	var notify = function( slideElement, indexh, indexv, origin ) {
		if( typeof origin === 'undefined' && origin !== 'remote' ) {
			var nextindexh;
			var nextindexv;

			var fragmentindex = Reveal.getIndices().f;
			if (typeof fragmentindex == 'undefined') {
				fragmentindex = 0;
			}

			if (slideElement.nextElementSibling && slideElement.parentNode.nodeName == 'SECTION') {
				nextindexh = indexh;
				nextindexv = indexv + 1;
			} else {
				nextindexh = indexh + 1;
				nextindexv = 0;
			}

			var slideData = {
				indexh : indexh,
				indexv : indexv,
				indexf : fragmentindex,
				nextindexh : nextindexh,
				nextindexv : nextindexv,
				secret: multiplex.secret,
				socketId : multiplex.id
			};

			socket.emit('slidechanged', slideData);
		}
	}

	Reveal.addEventListener( 'slidechanged', function( event ) {
		notify( event.currentSlide, event.indexh, event.indexv, event.origin );
	} );

	var fragmentNotify = function( event ) {
		notify( Reveal.getCurrentSlide(), Reveal.getIndices().h, Reveal.getIndices().v, event.origin );
	};

	Reveal.addEventListener( 'fragmentshown', fragmentNotify );
	Reveal.addEventListener( 'fragmenthidden', fragmentNotify );
}());

Version data entries

60 entries across 59 versions & 8 rubygems

Version Path
slippery-0.4.2 assets/reveal.js/plugin/multiplex/master.js
reveal-ck-3.6.0 files/reveal.js/plugin/multiplex/master.js
reveal-ck-3.5.1 files/reveal.js/plugin/multiplex/master.js
reveal-ck-3.5.0 files/reveal.js/plugin/multiplex/master.js
reveal-ck-3.4.0 files/reveal.js/plugin/multiplex/master.js
hyla-1.0.9 lib/resources/assets/revealjs/plugin/multiplex/master.js
reveal-ck-3.3.1 files/reveal.js/plugin/multiplex/master.js
dyndoc-ruby-0.3.0 share/etc/pandoc/extra/reveal.js-3.0.0/plugin/multiplex/master.js
dyndoc-ruby-0.3.0 share/etc/pandoc/extra/reveal.js-3.1.0/plugin/multiplex/master.js
hyla-1.0.9.pre.3 lib/resources/assets/revealjs/plugin/multiplex/master.js
hyla-1.0.9.pre.2 lib/resources/assets/revealjs/plugin/multiplex/master.js
hyla-1.0.9.pre.1 lib/resources/assets/revealjs/plugin/multiplex/master.js
reveal-ck-3.3.0 files/reveal.js/plugin/multiplex/master.js
reveal.rb-0.4.0 lib/reveal/templates/revealjs/plugin/multiplex/master.js
hyla-1.0.8 lib/resources/assets/revealjs/plugin/multiplex/master.js
slidemgr-1.0.3 lib/template/reveal.js-3.0.0/plugin/multiplex/master.js
slidemgr-1.0.2 lib/template/reveal.js-3.0.0/plugin/multiplex/master.js
slidemgr-1.0.1 lib/template/reveal.js-3.0.0/plugin/multiplex/master.js
reveal-ck-3.2.0 files/reveal.js/plugin/multiplex/master.js
slideparts-0.0.1 lib/slide_template/plugin/multiplex/master.js