aboutsummaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2012-07-04 14:18:09 -0400
committerHakim El Hattab <hakim.elhattab@gmail.com>2012-07-04 14:18:09 -0400
commit0e8640094301889e5c848dcf92084678778f0a19 (patch)
tree943f10c7ebc7268522505c3750e03ee14b59eadc /index.html
parent421afe6368686b40a13c3b837b41ae1ad552ff7f (diff)
downloadfosdem-2018-presentation-0e8640094301889e5c848dcf92084678778f0a19.tar
fosdem-2018-presentation-0e8640094301889e5c848dcf92084678778f0a19.tar.gz
conditional loading of socket.io and the notes client js based on window host
Diffstat (limited to 'index.html')
-rw-r--r--index.html20
1 files changed, 15 insertions, 5 deletions
diff --git a/index.html b/index.html
index b08c62a..68c5e4f 100644
--- a/index.html
+++ b/index.html
@@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
- <title>reveal.js</title>
+ <title>reveal.js - HTML5 Presentations</title>
<meta name="description" content="An easy to use CSS 3D slideshow tool for quickly creating good looking HTML presentations.">
<meta name="author" content="Hakim El Hattab">
@@ -313,11 +313,21 @@ linkify( 'a' );
transition: query.transition || 'default' // default/cube/page/concave/linear(2d)
});
+ // Fire off syntax highlighting for potential code samples in the slides
hljs.initHighlightingOnLoad();
- </script>
- <!-- The next two lines enable the speaker notes server -->
- <script src="socket.io/socket.io.js"></script>
- <script src="lib/slidenotes/client.js"></script>
+ // If we're runnning the notes node server we need to include some
+ // additional JS
+ if( window.location.host === 'localhost:1947' ) {
+ var notes_socket = document.createElement( 'script' );
+ notes_socket.setAttribute( 'src', 'socket.io/socket.io.js' );
+ document.body.appendChild( notes_socket );
+
+ var notes_client = document.createElement( 'script' );
+ notes_client.setAttribute( 'src', 'lib/slidenotes/client.js' );
+ document.body.appendChild( notes_client );
+ }
+ </script>
+
</body>
</html> \ No newline at end of file