diff options
author | Thomas Endres <Thomas-Endres@gmx.de> | 2013-11-19 21:10:20 +0100 |
---|---|---|
committer | Thomas Endres <Thomas-Endres@gmx.de> | 2013-11-19 21:10:20 +0100 |
commit | 08808abf0427245c210b9183fb69fc26bfa262b3 (patch) | |
tree | 3cddc545e29acd230bfbc823addbf3b3d1acc013 /js | |
parent | ffd8ccbffabdeb359ef2e32b5b1e792adfb257d4 (diff) | |
download | fosdem-2018-presentation-08808abf0427245c210b9183fb69fc26bfa262b3.tar fosdem-2018-presentation-08808abf0427245c210b9183fb69fc26bfa262b3.tar.gz |
Issue #698: Fixed tests
Diffstat (limited to 'js')
-rw-r--r-- | js/reveal.js | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/js/reveal.js b/js/reveal.js index e87a9cf..d856c3d 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -242,6 +242,7 @@ var Reveal = (function(){ } + /** * Loads the dependencies of reveal.js. Dependencies are * defined via the configuration option 'dependencies' @@ -264,6 +265,20 @@ var Reveal = (function(){ start(); } + function loadDependency(s) { + head.ready( s.src.match( /([\w\d_\-]*)\.?js$|[^\\\/]*$/i )[0], function() { + // Extension may contain callback functions + if( typeof s.callback === 'function' ) { + s.callback.apply(this); + } + + scriptsToApply--; + if (scriptsToApply === 0) { + proceed(); + } + }); + } + for( var i = 0, len = config.dependencies.length; i < len; i++ ) { var s = config.dependencies[i]; @@ -276,19 +291,7 @@ var Reveal = (function(){ scripts.push( s.src ); } - // Extension may contain callback functions - (function(s) { - head.ready( s.src.match( /([\w\d_\-]*)\.?js$|[^\\\/]*$/i )[0], function() { - if( typeof s.callback === 'function' ) { - s.callback.apply(this); - } - - scriptsToApply--; - if (scriptsToApply === 0) { - proceed(); - } - }); - })(s); + loadDependency(s); } } |