From 782b971d157b041f223dfd3c2027428f06b1c8c9 Mon Sep 17 00:00:00 2001 From: Eric Bidelman Date: Wed, 18 Apr 2012 17:42:08 -0700 Subject: Sytling for notes not in preso mode. tag FTR --- js/slide-controller.js | 2 ++ js/slides.js | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'js') diff --git a/js/slide-controller.js b/js/slide-controller.js index 594ee47..f93cd52 100644 --- a/js/slide-controller.js +++ b/js/slide-controller.js @@ -56,6 +56,8 @@ SlideController.prototype.setupDone = function() { evt.initEvent('keydown', true, true); evt.keyCode = 'P'.charCodeAt(0); this.popup.document.dispatchEvent(evt); + // this.popup.document.body.classList.add('with-notes'); + // document.body.classList.add('popup'); }.bind(this), false); } } diff --git a/js/slides.js b/js/slides.js index cd9e646..deaceb8 100644 --- a/js/slides.js +++ b/js/slides.js @@ -80,16 +80,14 @@ SlideDeck.prototype.onDomLoaded_ = function(e) { slide.dataset.totalSlides = this.slides_.length; } - // This is an app! Make all links open in a new tab. - [].forEach.call(document.querySelectorAll('a'), function(a) { - a.target = '_blank'; - }); - // Note: this needs to come after addEventListeners_(), which adds a // 'keydown' listener that this controller relies on. // Also, no need to set this up if we're on mobile. if (!Modernizr.touch) { this.controller = new SlideController(this); + if (this.controller.isPopup) { + document.body.classList.add('popup'); + } } }; @@ -603,6 +601,7 @@ SlideDeck.prototype.updateHash_ = function(dontPush) { window.location.replace(hash); } + // Record GA hit on this slide. window['_gaq'] && window['_gaq'].push(['_trackPageview', document.location.href]); } -- cgit v1.2.3