--- a/web/embedscript.php Mon May 21 18:18:08 2012 +0200
+++ b/web/embedscript.php Mon May 21 18:52:42 2012 +0200
@@ -57,14 +57,14 @@
window.setTimeout(function() {
_blocked = false;
}, 1000);
- _frame.contentWindow.postMessage({type: "hashchange", hash: document.location.hash}, "*");
+ _frame.contentWindow.postMessage(document.location.hash, "*");
};
window.onhashchange = _updater;
window.addEventListener('message', function(_e) {
- if (_e.data.type === "hashchange" && !_blocked) {
- document.location.hash = _e.data.hash;
+ if (/^#/.test(_e.data) && !_blocked) {
+ document.location.hash = _e.data;
}
});