bespokejs / bespoke-hash

Hash Routing for Bespoke.js
MIT License
15 stars 7 forks source link

Replace mode #7

Open hsablonniere opened 8 years ago

hsablonniere commented 8 years ago

Maybe we should support a replace mode for hashes.

I've been creating/using HTML5 based slide decks for years with DZSlides, reveal and bespoke. They all modify the current URL hash. It has pros and cons. It's a great feature to :

But I feel like it's polluting my browser tab history. If I navigate to a slide deck via a link and then pass through slides, it becomes very hard to go back to the origin website.

It's the same with HTML5 slide decks embedded in iframes for presenter console purposes or embedding on classic websites. The history of the iframe messes up with the main window's history.

I propose that this plugin provides a replace on/off switch. On each slide navigation, the current history/state would be replaced (and not added). This would allow to keep all pros and drop the annoying parts.

WDYT?

mojavelinux commented 6 years ago

This seems to be what PR #3 is proposing.