Anonymous avatar Anonymous committed 30848b6

some bug fixes with XSubdomain

Comments (0)

Files changed (2)

daemon/orbited/static/XSubdomainBridge.html

 };
 
 
-// Message receiver handler (req. for Opera compatibility)
-document.addEventListener('message', function(e) {
-    var msg = e.data;
-    var response = JSON.parse(msg);
-    req = response;
+if (typeof(opera) != "undefined")
+{
+    // Message receiver handler (req. for Opera compatibility)
+    document.addEventListener('message', function(e) {
+        var msg = e.data;
+        var response = JSON.parse(msg);
+        req = response;
+    }
+    , false
+    );  
 }
-, false
-);
 
 
 </script>

daemon/orbited/static/XSubdomainRequest.js

 
 // Message handler - parses messages posted by the
 // XSubdomainBridge
-document.addEventListener('message', function(e) {
-    var msg = e.data.split(" ");
-    var cmd = msg.shift();
-    if (cmd == "event") 
-    {
-        var id = msg.shift();
-        var dataString = msg.join(" ");
-        var data = JSON.parse(dataString);
 
-        XSubdomainRequest.prototype._event(id, data);
-    }
-    if (cmd == "queues")
-    {
-        var id = msg.shift();
-        var queue = XSubdomainRequest.prototype._state.queues[id];
-        if (queue.length > 0) {
-            var data = queue.shift();
-            e.source.postMessage(JSON.stringify(data), e.origin);
+if (browser == "opera")
+{
+    document.addEventListener('message', function(e) {
+        var msg = e.data.split(" ");
+        var cmd = msg.shift();
+        if (cmd == "event") 
+        {
+            var id = msg.shift();
+            var dataString = msg.join(" ");
+            var data = JSON.parse(dataString);
+    
+            XSubdomainRequest.prototype._event(id, data);
         }
-    }
-}, false
-);
+        if (cmd == "queues")
+        {
+            var id = msg.shift();
+            var queue = XSubdomainRequest.prototype._state.queues[id];
+            if (queue.length > 0) {
+                var data = queue.shift();
+                e.source.postMessage(JSON.stringify(data), e.origin);
+            }
+        }
+    }, false
+    );
+}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.