Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hash: false option doesn't work #487

Closed
ooker777 opened this issue Jul 9, 2024 · 4 comments
Closed

hash: false option doesn't work #487

ooker777 opened this issue Jul 9, 2024 · 4 comments

Comments

@ooker777
Copy link
Contributor

ooker777 commented Jul 9, 2024

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
Copy link
Owner

webpro commented Jul 9, 2024

What's in the HTML source, is it in there properly? There should be a <script> tag close to the closing </body> tag.

@ooker777
Copy link
Contributor Author

ooker777 commented Jul 9, 2024

<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
Copy link
Owner

webpro commented Jul 9, 2024

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
Copy link
Contributor Author

ooker777 commented Jul 9, 2024

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.

@ooker777 ooker777 closed this as completed Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants