fixed issue with dependency loader failing when there were 0 async scripts (#214)
This commit is contained in:
parent
5c5b3d34d9
commit
f51067b00e
@ -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();
|
||||
}
|
||||
|
20
js/reveal.min.js
vendored
20
js/reveal.min.js
vendored
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user