diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2012-10-29 08:27:20 -0400 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2012-10-29 08:27:20 -0400 |
commit | f51067b00e8099bb576858e70db6e2fc44ce3d61 (patch) | |
tree | e531dbdc93d536e9fe87e672e9713c109ba11cf6 /js | |
parent | 5c5b3d34d9031f08fb6b8a8e16345c36e2891c9d (diff) | |
download | perl-software-in-gnu-guix-f51067b00e8099bb576858e70db6e2fc44ce3d61.tar perl-software-in-gnu-guix-f51067b00e8099bb576858e70db6e2fc44ce3d61.tar.gz |
fixed issue with dependency loader failing when there were 0 async scripts (#214)
Diffstat (limited to 'js')
-rw-r--r-- | js/reveal.js | 6 | ||||
-rw-r--r-- | js/reveal.min.js | 20 |
2 files changed, 14 insertions, 12 deletions
diff --git a/js/reveal.js b/js/reveal.js index 2e3ee39..d92ee76 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -231,8 +231,10 @@ var Reveal = (function(){ // Called once synchronous scritps finish loading function proceed() { - // Load asynchronous scripts - head.js.apply( null, scriptsAsync ); + if( scriptsAsync.length ) { + // Load asynchronous scripts + head.js.apply( null, scriptsAsync ); + } start(); } diff --git a/js/reveal.min.js b/js/reveal.min.js index 53fb129..e31d807 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -16,16 +16,16 @@ f.controlsLeft=document.querySelector(".reveal .controls .left");f.controlsRight f.controlsDown=document.querySelector(".reveal .controls .down");}}function d(){if(navigator.userAgent.match(/(iphone|ipod|android)/i)){document.documentElement.style.overflow="scroll"; document.body.style.height="120%";window.addEventListener("load",ad,false);window.addEventListener("orientationchange",ad,false);}}function V(){var am=[],aq=[]; for(var an=0,al=R.dependencies.length;an<al;an++){var ao=R.dependencies[an];if(!ao.condition||ao.condition()){if(ao.async){aq.push(ao.src);}else{am.push(ao.src); -}if(typeof ao.callback==="function"){head.ready(ao.src.match(/([\w\d_\-]*)\.?[^\\\/]*$/i)[0],ao.callback);}}}function ap(){head.js.apply(null,aq);H();}if(am.length){head.ready(ap); -head.js.apply(null,am);}else{ap();}}function H(){P();E();K();J();O();setTimeout(function(){r("ready",{indexh:m,indexv:e,currentSlide:G});},1);}function K(){if(T===false){R.transition="linear"; -}if(R.controls&&f.controls){f.controls.style.display="block";}if(R.progress&&f.progress){f.progress.style.display="block";}if(R.transition!=="default"){f.wrapper.classList.add(R.transition); -}if(R.mouseWheel){document.addEventListener("DOMMouseScroll",o,false);document.addEventListener("mousewheel",o,false);}if(R.rollingLinks){N();}if(R.theme&&f.theme){var an=f.theme.getAttribute("href"); -var al=/[^\/]*?(?=\.css)/;var am=an.match(al)[0];if(R.theme!==am){an=an.replace(al,R.theme);f.theme.setAttribute("href",an);}}}function E(){document.addEventListener("touchstart",A,false); -document.addEventListener("touchmove",af,false);document.addEventListener("touchend",W,false);window.addEventListener("hashchange",w,false);if(R.keyboard){document.addEventListener("keydown",ah,false); -}if(R.progress&&f.progress){f.progress.addEventListener("click",q(ai),false);}if(R.controls&&f.controls){f.controlsLeft.addEventListener("click",q(B),false); -f.controlsRight.addEventListener("click",q(j),false);f.controlsUp.addEventListener("click",q(u),false);f.controlsDown.addEventListener("click",q(F),false); -}}function U(){document.removeEventListener("keydown",ah,false);document.removeEventListener("touchstart",A,false);document.removeEventListener("touchmove",af,false); -document.removeEventListener("touchend",W,false);window.removeEventListener("hashchange",w,false);if(R.progress&&f.progress){f.progress.removeEventListener("click",q(ai),false); +}if(typeof ao.callback==="function"){head.ready(ao.src.match(/([\w\d_\-]*)\.?[^\\\/]*$/i)[0],ao.callback);}}}function ap(){if(aq.length){head.js.apply(null,aq); +}H();}if(am.length){head.ready(ap);head.js.apply(null,am);}else{ap();}}function H(){P();E();K();J();O();setTimeout(function(){r("ready",{indexh:m,indexv:e,currentSlide:G}); +},1);}function K(){if(T===false){R.transition="linear";}if(R.controls&&f.controls){f.controls.style.display="block";}if(R.progress&&f.progress){f.progress.style.display="block"; +}if(R.transition!=="default"){f.wrapper.classList.add(R.transition);}if(R.mouseWheel){document.addEventListener("DOMMouseScroll",o,false);document.addEventListener("mousewheel",o,false); +}if(R.rollingLinks){N();}if(R.theme&&f.theme){var an=f.theme.getAttribute("href");var al=/[^\/]*?(?=\.css)/;var am=an.match(al)[0];if(R.theme!==am){an=an.replace(al,R.theme); +f.theme.setAttribute("href",an);}}}function E(){document.addEventListener("touchstart",A,false);document.addEventListener("touchmove",af,false);document.addEventListener("touchend",W,false); +window.addEventListener("hashchange",w,false);if(R.keyboard){document.addEventListener("keydown",ah,false);}if(R.progress&&f.progress){f.progress.addEventListener("click",q(ai),false); +}if(R.controls&&f.controls){f.controlsLeft.addEventListener("click",q(B),false);f.controlsRight.addEventListener("click",q(j),false);f.controlsUp.addEventListener("click",q(u),false); +f.controlsDown.addEventListener("click",q(F),false);}}function U(){document.removeEventListener("keydown",ah,false);document.removeEventListener("touchstart",A,false); +document.removeEventListener("touchmove",af,false);document.removeEventListener("touchend",W,false);window.removeEventListener("hashchange",w,false);if(R.progress&&f.progress){f.progress.removeEventListener("click",q(ai),false); }if(R.controls&&f.controls){f.controlsLeft.removeEventListener("click",q(B),false);f.controlsRight.removeEventListener("click",q(j),false);f.controlsUp.removeEventListener("click",q(u),false); f.controlsDown.removeEventListener("click",q(F),false);}}function t(am,al){for(var an in al){am[an]=al[an];}}function S(an,al){var ao=an.x-al.x,am=an.y-al.y; return Math.sqrt(ao*ao+am*am);}function q(al){return function(am){am.preventDefault();al.call(null,am);};}function ad(){setTimeout(function(){window.scrollTo(0,1); |