diff options
author | Guillaume Turri <guillaume.turri@gmail.com> | 2013-08-11 16:34:04 +0200 |
---|---|---|
committer | Guillaume Turri <guillaume.turri@gmail.com> | 2013-08-11 16:34:04 +0200 |
commit | 48f5ba936703a731392ead9ed910a6c7b21d898c (patch) | |
tree | 516a36fb0a93a497c7486fbe422a5c4126674eca /js | |
parent | 644ae56f4f86d5c3247764f17de6541cb7eb168f (diff) | |
download | fosdem-2018-presentation-48f5ba936703a731392ead9ed910a6c7b21d898c.tar fosdem-2018-presentation-48f5ba936703a731392ead9ed910a6c7b21d898c.tar.gz |
Formatting
Diffstat (limited to 'js')
-rw-r--r-- | js/reveal.js | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/js/reveal.js b/js/reveal.js index 5baacfb..b6210b1 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -193,24 +193,24 @@ var Reveal = (function(){ dom.slides = document.querySelector( '.reveal .slides' ); // Background element - dom.background = createSingletonNode(dom.wrapper, 'div', 'backgrounds', null); + dom.background = createSingletonNode( dom.wrapper, 'div', 'backgrounds', null ); // Progress bar - dom.progress = createSingletonNode(dom.wrapper, 'div', 'progress', '<span></span>'); - dom.progressbar = dom.progress.querySelector('span'); + dom.progress = createSingletonNode( dom.wrapper, 'div', 'progress', '<span></span>' ); + dom.progressbar = dom.progress.querySelector( 'span' ); // Arrow controls - createSingletonNode(dom.wrapper, 'aside', 'controls', + createSingletonNode( dom.wrapper, 'aside', 'controls', '<div class="navigate-left"></div>' + '<div class="navigate-right"></div>' + '<div class="navigate-up"></div>' + - '<div class="navigate-down"></div>'); + '<div class="navigate-down"></div>' ); // State background element [DEPRECATED] - createSingletonNode(dom.wrapper, 'div', 'state-background', null); + createSingletonNode( dom.wrapper, 'div', 'state-background', null ); // Overlay graphic which is displayed during the paused mode - createSingletonNode(dom.wrapper, 'div', 'pause-overlay', null); + createSingletonNode( dom.wrapper, 'div', 'pause-overlay', null ); // Cache references to elements if ( config.controls ) { @@ -227,17 +227,19 @@ var Reveal = (function(){ } - function createSingletonNode(container, tagname, classname, innerHTML){ - var node = container.querySelector('.' + classname); + function createSingletonNode( container, tagname, classname, innerHTML ){ + + var node = container.querySelector( '.' + classname ); if( !node ){ - node = document.createElement(tagname); - node.classList.add(classname); - if(innerHTML !== null){ + node = document.createElement( tagname ); + node.classList.add( classname ); + if( innerHTML !== null ){ node.innerHTML = innerHTML; } - container.appendChild(node); + container.appendChild( node ); } return node; + } /** |