Adjust styling after code review

This commit is contained in:
Frederic Hemberger 2013-01-01 16:46:52 +01:00
parent d5cc38e666
commit 0fe9b48470
1 changed files with 11 additions and 9 deletions

View File

@ -316,15 +316,17 @@ window.shower = (function(window, document, undefined) {
*/
shower.showPresenterNotes = function(slideNumber) {
if (window.console) {
var slide = slideList[ shower._normalizeSlideNumber(slideNumber) ].id;
var nextSlide = slideList[ shower._normalizeSlideNumber(slideNumber + 1) ].id;
slideNumber = shower._normalizeSlideNumber(slideNumber);
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) {
console.info(notes.innerHTML.replace(/\n\s+/g,'\n'));
}
if (nextSlide !== slide) {
var next = document.getElementById(nextSlide).querySelector('h2');
if (nextSlideId) {
var next = document.getElementById(nextSlideId).querySelector('h2');
if (next) {
next = next.innerHTML.replace(/^\s+|<[^>]+>/g,'');
console.info('NEXT: ' + next);