ensure history api is available, default to hash: true with no history in demo #2286
parent
6ef565c9fb
commit
b645828707
|
@ -260,12 +260,13 @@ Reveal.initialize({
|
||||||
// Display the page number of the current slide
|
// Display the page number of the current slide
|
||||||
slideNumber: false,
|
slideNumber: false,
|
||||||
|
|
||||||
|
// Add the current slide number to the URL hash so that reloading the
|
||||||
|
// page/copying the URL will return you to the same slide
|
||||||
|
hash: false,
|
||||||
|
|
||||||
// Push each slide change to the browser history. Implies `hash: true`
|
// Push each slide change to the browser history. Implies `hash: true`
|
||||||
history: false,
|
history: false,
|
||||||
|
|
||||||
// Change the hash when changing slides -- impacts browser history with `history: true`
|
|
||||||
hash: false,
|
|
||||||
|
|
||||||
// Enable keyboard shortcuts for navigation
|
// Enable keyboard shortcuts for navigation
|
||||||
keyboard: true,
|
keyboard: true,
|
||||||
|
|
||||||
|
|
|
@ -393,8 +393,8 @@ Reveal.addEventListener( 'customevent', function() {
|
||||||
Reveal.initialize({
|
Reveal.initialize({
|
||||||
controls: true,
|
controls: true,
|
||||||
progress: true,
|
progress: true,
|
||||||
history: true,
|
|
||||||
center: true,
|
center: true,
|
||||||
|
hash: true,
|
||||||
|
|
||||||
transition: 'slide', // none/fade/slide/convex/concave/zoom
|
transition: 'slide', // none/fade/slide/convex/concave/zoom
|
||||||
|
|
||||||
|
|
|
@ -76,12 +76,13 @@
|
||||||
// Determine which displays to show the slide number on
|
// Determine which displays to show the slide number on
|
||||||
showSlideNumber: 'all',
|
showSlideNumber: 'all',
|
||||||
|
|
||||||
|
// Add the current slide number to the URL hash so that reloading the
|
||||||
|
// page/copying the URL will return you to the same slide
|
||||||
|
hash: false,
|
||||||
|
|
||||||
// Push each slide change to the browser history. Implies `hash: true`
|
// Push each slide change to the browser history. Implies `hash: true`
|
||||||
history: false,
|
history: false,
|
||||||
|
|
||||||
// Change the hash when changing slides -- impacts browser history with `history: true`
|
|
||||||
hash: false,
|
|
||||||
|
|
||||||
// Enable keyboard shortcuts for navigation
|
// Enable keyboard shortcuts for navigation
|
||||||
keyboard: true,
|
keyboard: true,
|
||||||
|
|
||||||
|
@ -4148,7 +4149,7 @@
|
||||||
writeURLTimeout = setTimeout( writeURL, delay );
|
writeURLTimeout = setTimeout( writeURL, delay );
|
||||||
}
|
}
|
||||||
else if( currentSlide ) {
|
else if( currentSlide ) {
|
||||||
if ( config.history ) {
|
if( config.history || !window.history ) {
|
||||||
window.location.hash = locationHash();
|
window.location.hash = locationHash();
|
||||||
}
|
}
|
||||||
else if( config.hash ) {
|
else if( config.hash ) {
|
||||||
|
|
Loading…
Reference in New Issue