Skip to content

Instantly share code, notes, and snippets.

Created April 28, 2013 17:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Snippet to keep reveal.js windows in sync using storage events.
// only for top level windows
if( === window){
// store the new slide index
Reveal.addEventListener('slidechanged', function(e) {
var send = e.indexh + ',' + e.indexv;
// restore
window.addEventListener("storage", function(e){
if(e.key == 'rslide'){
var vals = e.newValue.split(',').map(parseFloat);
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment