Resources attached to the Road To DevOps tutorial
https://blog.noobtoroot.xyz/road-to-devops/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
849 B
31 lines
849 B
(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 ); |
|
|
|
function post() { |
|
|
|
var messageData = { |
|
state: Reveal.getState(), |
|
secret: multiplex.secret, |
|
socketId: multiplex.id |
|
}; |
|
|
|
socket.emit( 'multiplex-statechanged', messageData ); |
|
|
|
}; |
|
|
|
// Monitor events that trigger a change in state |
|
Reveal.addEventListener( 'slidechanged', post ); |
|
Reveal.addEventListener( 'fragmentshown', post ); |
|
Reveal.addEventListener( 'fragmenthidden', post ); |
|
Reveal.addEventListener( 'overviewhidden', post ); |
|
Reveal.addEventListener( 'overviewshown', post ); |
|
Reveal.addEventListener( 'paused', post ); |
|
Reveal.addEventListener( 'resumed', post ); |
|
|
|
}()); |