Permalink
Browse files

prevent same theme from loading repeatedly

  • Loading branch information...
hakimel committed Aug 30, 2012
1 parent dc9b93a commit 0c06469d82fbc0ca2f4a2bf2d07e9e5a04cfc37f
Showing with 12 additions and 7 deletions.
  1. +5 −1 js/reveal.js
  2. +7 −6 js/reveal.min.js
View
@@ -226,8 +226,12 @@ var Reveal = (function(){
dom.progress.style.display = 'block';
}
+ // Load the theme in the config, if it's not already loaded
if( config.theme && dom.theme ) {
- dom.theme.setAttribute( 'href', 'css/theme/' + config.theme + '.css' );
+ var themeURL = 'css/theme/' + config.theme + '.css';
+ if( dom.theme.getAttribute( 'href' ) !== themeURL ) {
+ dom.theme.setAttribute( 'href', themeURL );
+ }
}
if( config.transition !== 'default' ) {
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 0c06469

Please sign in to comment.