Last active
June 2, 2017 17:53
-
-
Save devmessias/b03de0ae67b9ff3c878a98b4ffdcb478 to your computer and use it in GitHub Desktop.
Rember last slide of reveal.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var stateReveal = JSON.parse(window.localStorage.getItem("state")); | |
if (stateReveal != null){ | |
Reveal.navigateTo(stateReveal.indexh, stateReveal.indexv) | |
} | |
window.onbeforeunload = function(e){ | |
window.localStorage.setItem("state", JSON.stringify(Reveal.getState())) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment