From 372b4e5e448b2a4eab20877ebc7c8aece976c5c6 Mon Sep 17 00:00:00 2001 From: Kang Seonghoon Date: Thu, 2 May 2013 01:22:55 +0900 Subject: [PATCH] added support for hashchange event for recent browsers --- overviewer_core/data/js_src/util.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/overviewer_core/data/js_src/util.js b/overviewer_core/data/js_src/util.js index d3c9515..156640e 100644 --- a/overviewer_core/data/js_src/util.js +++ b/overviewer_core/data/js_src/util.js @@ -138,8 +138,9 @@ overviewer.util = { overviewer.mapView.render(); - // Jump to the hash if given + // Jump to the hash if given (and do so for any further hash changes) overviewer.util.initHash(); + $(window).on('hashchange', function() { overviewer.util.initHash(); }); // create this control after initHash so it can correctly select the current world var worldSelector = new overviewer.views.WorldSelectorView({tagName:'DIV'});