code format tweaks
This commit is contained in:
parent
75845a92c3
commit
3be84bcbe3
13
js/reveal.js
13
js/reveal.js
@ -251,12 +251,14 @@ var Reveal = (function(){
|
||||
* will load after reveal.js has been started up.
|
||||
*/
|
||||
function load() {
|
||||
|
||||
var scripts = [],
|
||||
scriptsAsync = [],
|
||||
scriptsToApply = 0;
|
||||
scriptsToPreload = 0;
|
||||
|
||||
// Called once synchronous scripts finish loading
|
||||
function proceed() {
|
||||
console.log(111);
|
||||
if( scriptsAsync.length ) {
|
||||
// Load asynchronous scripts
|
||||
head.js.apply( null, scriptsAsync );
|
||||
@ -265,15 +267,14 @@ var Reveal = (function(){
|
||||
start();
|
||||
}
|
||||
|
||||
function loadDependency(s) {
|
||||
function loadScript( 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) {
|
||||
if( --scriptsToPreload === 0 ) {
|
||||
proceed();
|
||||
}
|
||||
});
|
||||
@ -291,12 +292,12 @@ var Reveal = (function(){
|
||||
scripts.push( s.src );
|
||||
}
|
||||
|
||||
loadDependency(s);
|
||||
loadScript( s );
|
||||
}
|
||||
}
|
||||
|
||||
if( scripts.length ) {
|
||||
scriptsToApply = scripts.length;
|
||||
scriptsToPreload = scripts.length;
|
||||
|
||||
// Load synchronous scripts
|
||||
head.js.apply( null, scripts );
|
||||
|
6
js/reveal.min.js
vendored
6
js/reveal.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user