aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorEric Bidelman2012-04-18 17:42:08 -0700
committerEric Bidelman2012-04-18 17:43:20 -0700
commit782b971d157b041f223dfd3c2027428f06b1c8c9 (patch)
tree8524f5e77608fdb3aba88580e48cf7091233da8c /js
parenta8e534158525f69db7276cded5f79e6fb6819754 (diff)
downloadio-slides-remote-782b971d157b041f223dfd3c2027428f06b1c8c9.tar.gz
Sytling for notes not in preso mode. <base> tag FTR
Diffstat (limited to 'js')
-rw-r--r--js/slide-controller.js2
-rw-r--r--js/slides.js9
2 files changed, 6 insertions, 5 deletions
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() {
56 evt.initEvent('keydown', true, true); 56 evt.initEvent('keydown', true, true);
57 evt.keyCode = 'P'.charCodeAt(0); 57 evt.keyCode = 'P'.charCodeAt(0);
58 this.popup.document.dispatchEvent(evt); 58 this.popup.document.dispatchEvent(evt);
59 // this.popup.document.body.classList.add('with-notes');
60 // document.body.classList.add('popup');
59 }.bind(this), false); 61 }.bind(this), false);
60 } 62 }
61 } 63 }
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) {
80 slide.dataset.totalSlides = this.slides_.length; 80 slide.dataset.totalSlides = this.slides_.length;
81 } 81 }
82 82
83 // This is an app! Make all links open in a new tab.
84 [].forEach.call(document.querySelectorAll('a'), function(a) {
85 a.target = '_blank';
86 });
87
88 // Note: this needs to come after addEventListeners_(), which adds a 83 // Note: this needs to come after addEventListeners_(), which adds a
89 // 'keydown' listener that this controller relies on. 84 // 'keydown' listener that this controller relies on.
90 // Also, no need to set this up if we're on mobile. 85 // Also, no need to set this up if we're on mobile.
91 if (!Modernizr.touch) { 86 if (!Modernizr.touch) {
92 this.controller = new SlideController(this); 87 this.controller = new SlideController(this);
88 if (this.controller.isPopup) {
89 document.body.classList.add('popup');
90 }
93 } 91 }
94}; 92};
95 93
@@ -603,6 +601,7 @@ SlideDeck.prototype.updateHash_ = function(dontPush) {
603 window.location.replace(hash); 601 window.location.replace(hash);
604 } 602 }
605 603
604 // Record GA hit on this slide.
606 window['_gaq'] && window['_gaq'].push(['_trackPageview', 605 window['_gaq'] && window['_gaq'].push(['_trackPageview',
607 document.location.href]); 606 document.location.href]);
608 } 607 }