Commit 0fe9b484 authored by Frederic Hemberger's avatar Frederic Hemberger

Adjust styling after code review

parent d5cc38e6
...@@ -132,13 +132,13 @@ window.shower = (function(window, document, undefined) { ...@@ -132,13 +132,13 @@ window.shower = (function(window, document, undefined) {
*/ */
shower.enterSlideMode = function() { shower.enterSlideMode = function() {
// check if it's already in slide mode... // check if it's already in slide mode...
if ( body.classList.contains('full') ) { return; } if (body.classList.contains('full')) { return; }
body.classList.remove('list'); body.classList.remove('list');
body.classList.add('full'); body.classList.add('full');
if ( window.console && window.console.clear ) { console.clear(); } if (window.console && window.console.clear) { console.clear(); }
shower.showPresenterNotes( shower.getCurrentSlideNumber() ); shower.showPresenterNotes(shower.getCurrentSlideNumber());
return shower._applyTransform(shower._getTransform()); return shower._applyTransform(shower._getTransform());
}; };
...@@ -149,7 +149,7 @@ window.shower = (function(window, document, undefined) { ...@@ -149,7 +149,7 @@ window.shower = (function(window, document, undefined) {
*/ */
shower.enterListMode = function() { shower.enterListMode = function() {
// check if it's already in list mode... // check if it's already in list mode...
if ( body.classList.contains('list') ) { return; } if (body.classList.contains('list')) { return; }
body.classList.remove('full'); body.classList.remove('full');
body.classList.add('list'); body.classList.add('list');
...@@ -316,15 +316,17 @@ window.shower = (function(window, document, undefined) { ...@@ -316,15 +316,17 @@ window.shower = (function(window, document, undefined) {
*/ */
shower.showPresenterNotes = function(slideNumber) { shower.showPresenterNotes = function(slideNumber) {
if (window.console) { if (window.console) {
var slide = slideList[ shower._normalizeSlideNumber(slideNumber) ].id; slideNumber = shower._normalizeSlideNumber(slideNumber);
var nextSlide = slideList[ shower._normalizeSlideNumber(slideNumber + 1) ].id;
var notes = document.getElementById(slide).querySelector('.presenter-notes'); var slideId = slideList[slideNumber].id;
var nextSlideId = slideList[slideNumber + 1] ? slideList[slideNumber + 1].id : null;
var notes = document.getElementById(slideId).querySelector('.presenter-notes');
if (notes) { if (notes) {
console.info(notes.innerHTML.replace(/\n\s+/g,'\n')); console.info(notes.innerHTML.replace(/\n\s+/g,'\n'));
} }
if (nextSlide !== slide) { if (nextSlideId) {
var next = document.getElementById(nextSlide).querySelector('h2'); var next = document.getElementById(nextSlideId).querySelector('h2');
if (next) { if (next) {
next = next.innerHTML.replace(/^\s+|<[^>]+>/g,''); next = next.innerHTML.replace(/^\s+|<[^>]+>/g,'');
console.info('NEXT: ' + next); console.info('NEXT: ' + next);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment