From 551c783b7241760594a31e286822ee5643ecc0e6 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 17 Oct 2012 23:01:41 -0400 Subject: [PATCH] fix issue in browsers that don't support classList --- js/reveal.js | 6 +++--- js/reveal.min.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/reveal.js b/js/reveal.js index e53195f..c2769e5 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -120,9 +120,6 @@ var Reveal = (function(){ // Copy options over to our config object extend( config, options ); - // Make sure we've got all the DOM elements we need - setupDOM(); - // Hide the address bar in mobile browsers hideAddressBar(); @@ -256,6 +253,9 @@ var Reveal = (function(){ * to the current URL deeplink if there is one. */ function start() { + // Make sure we've got all the DOM elements we need + setupDOM(); + // Subscribe to input addEventListeners(); diff --git a/js/reveal.min.js b/js/reveal.min.js index e844a75..73053d3 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -6,7 +6,7 @@ * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se */ var Reveal=(function(){var l=".reveal .slides>section",b=".reveal .slides>section.present>section",R={controls:true,progress:true,history:false,keyboard:true,overview:true,loop:false,autoSlide:0,mouseWheel:true,rollingLinks:true,theme:null,transition:"default",dependencies:[]},Y=R.autoSlide,m=0,e=0,y,G,aj=[],f={},T="WebkitPerspective" in document.body.style||"MozPerspective" in document.body.style||"msPerspective" in document.body.style||"OPerspective" in document.body.style||"perspective" in document.body.style,n="WebkitTransform" in document.body.style||"MozTransform" in document.body.style||"msTransform" in document.body.style||"OTransform" in document.body.style||"transform" in document.body.style,z=0,k=0,D=0,ac={startX:0,startY:0,startSpan:0,startCount:0,handled:false,threshold:80}; -function i(ak){if((!n&&!T)){document.body.setAttribute("class","no-transforms");return;}t(R,ak);P();d();V();}function P(){f.theme=document.querySelector("#theme"); +function i(ak){if((!n&&!T)){document.body.setAttribute("class","no-transforms");return;}t(R,ak);d();V();}function P(){f.theme=document.querySelector("#theme"); f.wrapper=document.querySelector(".reveal");if(!f.wrapper.querySelector(".progress")&&R.progress){var an=document.createElement("div");an.classList.add("progress"); an.innerHTML="";f.wrapper.appendChild(an);}if(!f.wrapper.querySelector(".controls")&&R.controls){var am=document.createElement("aside");am.classList.add("controls"); am.innerHTML=''; @@ -18,7 +18,7 @@ f.controlsDown=document.querySelector(".reveal .controls .down");}}function d(){ document.body.style.height="120%";window.addEventListener("load",ad,false);window.addEventListener("orientationchange",ad,false);}}function V(){var al=[],ap=[]; for(var am=0,ak=R.dependencies.length;am