From 5481f4f009dd6844bdb5c74fb16483f0f802de66 Mon Sep 17 00:00:00 2001 From: Oleg Roschupkin Date: Mon, 18 Jul 2011 18:39:47 +0900 Subject: [PATCH] Fix issue #30 --- scripts/script.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/script.js b/scripts/script.js index a1fa491..7d3469f 100755 --- a/scripts/script.js +++ b/scripts/script.js @@ -113,7 +113,12 @@ window.addEventListener('DOMContentLoaded', function() { if(isFull()) enterFull(); }, false); + window.addEventListener("popstate", function() { + var current_slide_number = slideList.indexOf(url.hash.substr(1)); + if (-1 === current_slide_number) { exitFull(); } + }, false); + document.addEventListener('keydown', turnSlide, false); document.addEventListener('keydown', enterFullKey, false); -})(); \ No newline at end of file +})();