`hash: false` option doesn't work
Closed this issue · 4 comments
ooker777 commented
I want to turn off the hash so that my history doesn't mess up. I add:
revealOptions:
hash: false
but it doesn't work.
webpro commented
What's in the HTML source, is it in there properly? There should be a <script>
tag close to the closing </body>
tag.
ooker777 commented
<script>
function extend() {
var target = {};
for (var i = 0; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (source.hasOwnProperty(key)) {
target[key] = source[key];
}
}
}
return target;
}
// default options to init reveal.js
var defaultOptions = {
controls: true,
progress: true,
history: true,
center: true,
transition: 'default', // none/fade/slide/convex/concave/zoom
slideNumber: true,
highlight: {
highlightOnLoad: false
},
plugins: [
RevealMarkdown,
RevealHighlight,
RevealZoom,
RevealNotes,
RevealMath
]
};
// options from URL query string
var queryOptions = Reveal().getQueryHash() || {};
var options = extend(defaultOptions, {"transition":"slide","hash":false,"slideNumber":false,"history":"fasle","_":[".\\Đáp ứng nhu cầu doanh nghiệp.md"],"w":true,"watch":true}, queryOptions);
</script>
webpro commented
That looks alright to me, might be an issue with Reveal.js as well then. Haven't used this option myself.
Also I see a typo in "history":"fasle"
ooker777 commented
Hmm, it seems like setting history: false
will turn off the hash as well. Meanwhile if you only set hash: false
and let the history option as default, then the history is injected, even though the default value of it is false
.