--- a/src/widgets/Mediafragment.js Mon May 21 13:17:47 2012 +0200
+++ b/src/widgets/Mediafragment.js Tue May 22 16:49:48 2012 +0200
@@ -5,8 +5,8 @@
window.onhashchange = this.functionWrapper("goToHash");
if (typeof window.addEventListener !== "undefined") {
window.addEventListener('message', function(_msg) {
- if (_msg.data.type === "hashchange") {
- document.location.hash = _msg.data.hash;
+ if (/^#/.test(_msg.data)) {
+ document.location.hash = _msg.data;
}
})
};
@@ -73,10 +73,7 @@
var _hash = this.getLastHash();
document.location.hash = _hash;
if (window.parent !== window) {
- window.parent.postMessage({
- type: "hashchange",
- hash: _hash
- })
+ window.parent.postMessage(_hash,"*")
}
this.block();
}