From 8a84040be926fc2601aff8b5568207e214f23be3 Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Mon, 11 May 2015 10:40:48 -0400 Subject: [PATCH] Ensure history state change on showPage Fix #9 --- js/scratchx.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/scratchx.js b/js/scratchx.js index 74cdf10..efb4796 100644 --- a/js/scratchx.js +++ b/js/scratchx.js @@ -352,6 +352,13 @@ function showPage(path) { if ($toShow.is(Scratch.FlashApp.$ASobj)) { $toShow.css({top: 0}); } + if (document.location.hash.substr(1) != path) { + if (path != "home") { + document.location.hash = '#' + path; + } else { + document.location.hash = ''; + } + } }