diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/slides.js | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/js/slides.js b/js/slides.js index f6d5cc6..dab51f9 100644 --- a/js/slides.js +++ b/js/slides.js | |||
@@ -65,15 +65,18 @@ SlideDeck.prototype.addEventListeners_ = function() { | |||
65 | window.addEventListener('popstate', this.handlePopState_.bind(this), false); | 65 | window.addEventListener('popstate', this.handlePopState_.bind(this), false); |
66 | 66 | ||
67 | // Google Developer icon gray bar should reanimate on every slide enter. | 67 | // Google Developer icon gray bar should reanimate on every slide enter. |
68 | var titleSlide = document.querySelector('#title-slide'); | 68 | var gbars = document.querySelectorAll('slide > .gdbar'); |
69 | titleSlide.addEventListener('slideenter', function(e) { | 69 | for (var i = 0, gbar; gbar = gbars[i]; ++i) { |
70 | this.buildNextItem_(); | 70 | var slide = gbar.parentElement; |
71 | }.bind(this), false); | 71 | slide.addEventListener('slideenter', function(e) { |
72 | titleSlide.addEventListener('slideleave', function(e) { | 72 | this.buildNextItem_(); |
73 | var bar = e.target.querySelector('.gdbar'); | 73 | }.bind(this), false); |
74 | bar.classList.remove('build-current'); | 74 | slide.addEventListener('slideleave', function(e) { |
75 | bar.classList.add('to-build'); | 75 | var bar = e.target.querySelector('.gdbar'); |
76 | }, false); | 76 | bar.classList.remove('build-current'); |
77 | bar.classList.add('to-build'); | ||
78 | }, false); | ||
79 | } | ||
77 | }; | 80 | }; |
78 | 81 | ||
79 | /** | 82 | /** |
@@ -175,8 +178,7 @@ SlideDeck.prototype.loadConfig_ = function() { | |||
175 | } | 178 | } |
176 | 179 | ||
177 | if (!!!('usePrettify' in settings) || settings.usePrettify) { | 180 | if (!!!('usePrettify' in settings) || settings.usePrettify) { |
178 | console.log('Use prettify'); | 181 | prettyPrint(); |
179 | //TODO | ||
180 | } | 182 | } |
181 | 183 | ||
182 | if (settings.analyticsId) { | 184 | if (settings.analyticsId) { |
@@ -489,7 +491,7 @@ SlideDeck.prototype.addFavIcon_ = function(favIcon) { | |||
489 | * @param {string} theme | 491 | * @param {string} theme |
490 | */ | 492 | */ |
491 | SlideDeck.prototype.loadTheme_ = function(theme) { | 493 | SlideDeck.prototype.loadTheme_ = function(theme) { |
492 | var styles = [theme]; | 494 | var styles = [/*'../../js/prettify/prettify',*/ theme]; |
493 | for (var i = 0, style; themeUrl = styles[i]; i++) { | 495 | for (var i = 0, style; themeUrl = styles[i]; i++) { |
494 | var style = document.createElement('link'); | 496 | var style = document.createElement('link'); |
495 | style.rel = 'stylesheet'; | 497 | style.rel = 'stylesheet'; |