From 01a4eef42318195ce75dcc00e00b85b3522e4863 Mon Sep 17 00:00:00 2001 From: Oleg Roschupkin Date: Thu, 21 Jul 2011 21:28:06 +0900 Subject: [PATCH] Fix issue #41 with black screen on "pathname?full" without slide hash. --- scripts/script.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/script.js b/scripts/script.js index 499dd6a..3464961 100755 --- a/scripts/script.js +++ b/scripts/script.js @@ -82,8 +82,14 @@ window.addEventListener('DOMContentLoaded', function () { if (!isSlideListMode()) { - updateProgress(getCurrentSlideNumber()); + // "?full" is present without slide hash so we should display first + // slide + if ( -1 === getCurrentSlideNumber() ) { + history.replaceState(null, null, url.pathname + '?full' + getSlideHashByNumber( 0 ) ); + } + enterSingleSlideMode(); + updateProgress(getCurrentSlideNumber()); } }, false);