Skip to content

Commit

Permalink
clean up initialization, conditionally load classList polyfill prior …
Browse files Browse the repository at this point in the history
…to reveal.js
  • Loading branch information
hakimel committed Jul 21, 2012
1 parent 0ef90e0 commit c513500
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -251,20 +251,20 @@ <h3 class="inverted">BY Hakim El Hattab / hakim.se</h3>
<a class="down" href="#">&#x25BC;</a>
</aside>

<!-- Displays presentation progress, max value changes via JS to reflect # of slides -->
<!-- Presentation progress bar -->
<div class="progress"><span></span></div>

</div>

<!-- Optional libraries for code syntax highlighting and classList support in IE9 -->
<script src="lib/js/head.min.js"></script>

<script>
// Load the main reveal.js script
head.js( 'js/reveal.js', function() {
// Load reveal.js as well as a classList polyfill if needed
head.js( !document.body.classList ? 'lib/js/classList.js' : null )
.js( 'js/reveal.js', function() {

// Parse the query string into a key/value object
var query = {};

location.search.replace( /[A-Z0-9]+?=(\w*)/gi, function(a) {
query[ a.split( '=' ).shift() ] = a.split( '=' ).pop();
} );
Expand All @@ -289,13 +289,12 @@ <h3 class="inverted">BY Hakim El Hattab / hakim.se</h3>
theme: query.theme || 'default', // default/neon/beige
transition: query.transition || 'default' // default/cube/page/concave/linear(2d)
});

} );

// Load third party scripts
head.js( 'lib/js/classList.js' );
head.js( 'lib/js/highlight.js', function() {
// Fire off syntax highlighting for potential code samples in the slides
hljs.initHighlightingOnLoad();
// Load highlight.js for syntax highlighting of code samples
head.js( 'lib/js/highlight.js', function() {
hljs.initHighlightingOnLoad();
} );

// If we're runnning the notes server we need to include some additional JS
Expand Down

0 comments on commit c513500

Please sign in to comment.