prevent same theme from loading repeatedly

This commit is contained in:
Hakim El Hattab
2012-08-30 01:13:25 -04:00
parent dc9b93a533
commit 0c06469d82
2 changed files with 12 additions and 7 deletions

View File

@@ -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' ) {