web/res/metadataplayer/Mediafragment.js
changeset 621 44f90de0016f
parent 620 953c68b4da79
child 638 e0d4e8431de3
--- a/web/res/metadataplayer/Mediafragment.js	Mon May 21 18:18:08 2012 +0200
+++ b/web/res/metadataplayer/Mediafragment.js	Mon May 21 18:52:42 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();
     }