diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2014-06-05 10:43:12 +0200 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2014-06-05 10:43:25 +0200 |
commit | c5daba6a1fda21573620852b9041d3a922a07e70 (patch) | |
tree | 0e03d4a4e39fa9fb00f145a5bc4d9249601c0eed /js | |
parent | 6d1a66c2bcb3e859bcf011a3af60b8196c0d4c1f (diff) | |
download | fosdem-2018-presentation-c5daba6a1fda21573620852b9041d3a922a07e70.tar fosdem-2018-presentation-c5daba6a1fda21573620852b9041d3a922a07e70.tar.gz |
write current hash when history is toggled on #934
Diffstat (limited to 'js')
-rw-r--r-- | js/reveal.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/js/reveal.js b/js/reveal.js index 1990e8f..d9451cb 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1859,6 +1859,9 @@ // Re-create the slide backgrounds createBackgrounds(); + // Write the current hash to the URL + writeURL(); + sortAllFragments(); updateControls(); @@ -2641,7 +2644,7 @@ if( typeof delay === 'number' ) { writeURLTimeout = setTimeout( writeURL, delay ); } - else { + else if( currentSlide ) { var url = '/'; // Attempt to create a named link based on the slide's ID @@ -2652,7 +2655,7 @@ } // If the current slide has an ID, use that as a named link - if( currentSlide && typeof id === 'string' && id.length ) { + if( typeof id === 'string' && id.length ) { url = '/' + id; } // Otherwise use the /h/v index |