Commit 2770d42b authored by Vadim Makeev's avatar Vadim Makeev

Merge pull request #93 from EvgenyZhlobo/add-braces

Add braces to all ifs
parents 8f9ff9c2 55a49bee
...@@ -379,8 +379,9 @@ window.shower = (function(window, document, undefined) { ...@@ -379,8 +379,9 @@ window.shower = (function(window, document, undefined) {
// NOTE: we should update hash to get things work properly // NOTE: we should update hash to get things work properly
url.hash = '#' + slideId; url.hash = '#' + slideId;
if (isHistoryApiSupported) if (isHistoryApiSupported) {
history.replaceState(null, null, url.pathname + '?full#' + slideId); history.replaceState(null, null, url.pathname + '?full#' + slideId);
}
shower.enterSlideMode(); shower.enterSlideMode();
shower.updateProgress(shower.getCurrentSlideNumber()); shower.updateProgress(shower.getCurrentSlideNumber());
...@@ -456,8 +457,9 @@ window.shower = (function(window, document, undefined) { ...@@ -456,8 +457,9 @@ window.shower = (function(window, document, undefined) {
if ( ! shower.isListMode()) { if ( ! shower.isListMode()) {
// "?full" is present without slide hash, so we should display first slide // "?full" is present without slide hash, so we should display first slide
if (-1 === shower.getCurrentSlideNumber()) { if (-1 === shower.getCurrentSlideNumber()) {
if (isHistoryApiSupported) if (isHistoryApiSupported) {
history.replaceState(null, null, url.pathname + '?full' + shower.getSlideHash(0)); history.replaceState(null, null, url.pathname + '?full' + shower.getSlideHash(0));
}
} }
shower.enterSlideMode(); shower.enterSlideMode();
...@@ -519,8 +521,9 @@ window.shower = (function(window, document, undefined) { ...@@ -519,8 +521,9 @@ window.shower = (function(window, document, undefined) {
if (shower.isListMode() && -1 !== currentSlideNumber) { if (shower.isListMode() && -1 !== currentSlideNumber) {
e.preventDefault(); e.preventDefault();
if (isHistoryApiSupported) if (isHistoryApiSupported) {
history.pushState(null, null, url.pathname + '?full' + shower.getSlideHash(currentSlideNumber)); history.pushState(null, null, url.pathname + '?full' + shower.getSlideHash(currentSlideNumber));
}
shower.enterSlideMode(); shower.enterSlideMode();
shower.updateProgress(currentSlideNumber); shower.updateProgress(currentSlideNumber);
...@@ -533,8 +536,9 @@ window.shower = (function(window, document, undefined) { ...@@ -533,8 +536,9 @@ window.shower = (function(window, document, undefined) {
if ( ! shower.isListMode()) { if ( ! shower.isListMode()) {
e.preventDefault(); e.preventDefault();
if (isHistoryApiSupported) if (isHistoryApiSupported) {
history.pushState(null, null, url.pathname + shower.getSlideHash(currentSlideNumber)); history.pushState(null, null, url.pathname + shower.getSlideHash(currentSlideNumber));
}
shower.enterListMode(); shower.enterListMode();
shower.scrollToSlide(currentSlideNumber); shower.scrollToSlide(currentSlideNumber);
} }
......
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