2 * Touch-based remote controller for your presentation courtesy
3 * of the folks at http://remotes.io
9 * Detects if we are dealing with a touch enabled device (with some false positives)
10 * Borrowed from modernizr: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touch.js
12 var hasTouch = (function(){
13 return ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch;
17 * Detects if notes are enable and the current page is opened inside an /iframe
18 * this prevents loading Remotes.io several times
20 var isNotesAndIframe = (function(){
21 return window.RevealNotes && !(self == top);
24 if(!hasTouch && !isNotesAndIframe){
25 head.ready( 'remotes.ne.min.js', function() {
26 new Remotes("preview")
27 .on("swipe-left", function(e){ Reveal.right(); })
28 .on("swipe-right", function(e){ Reveal.left(); })
29 .on("swipe-up", function(e){ Reveal.down(); })
30 .on("swipe-down", function(e){ Reveal.up(); })
31 .on("tap", function(e){ Reveal.next(); })
32 .on("zoom-out", function(e){ Reveal.toggleOverview(true); })
33 .on("zoom-in", function(e){ Reveal.toggleOverview(false); })
37 head.js('https://hakim-static.s3.amazonaws.com/reveal-js/remotes.ne.min.js');