summary refs log tree commit diff
path: root/jsfiddles
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-09-22 18:54:00 +0100
committerMark Haines <mark.haines@matrix.org>2014-09-22 18:54:00 +0100
commit09d79b0a9bf7a194383830d2e55530c70f2366b6 (patch)
tree76573bac3ca48deeca6cd33f91ed2ee3408dffb2 /jsfiddles
parentSYN-39: Add documentation explaining how to check a signature (diff)
parentShow display name changes in the message list. (diff)
downloadsynapse-09d79b0a9bf7a194383830d2e55530c70f2366b6.tar.xz
Merge branch 'develop' into server2server_signing
Diffstat (limited to 'jsfiddles')
-rw-r--r--jsfiddles/create_room_send_msg/demo.js7
-rw-r--r--jsfiddles/event_stream/demo.js7
-rw-r--r--jsfiddles/example_app/demo.details7
-rw-r--r--jsfiddles/register_login/demo.js14
-rw-r--r--jsfiddles/room_memberships/demo.js7
5 files changed, 37 insertions, 5 deletions
diff --git a/jsfiddles/create_room_send_msg/demo.js b/jsfiddles/create_room_send_msg/demo.js
index 3dc7263830..9c346e2f64 100644
--- a/jsfiddles/create_room_send_msg/demo.js
+++ b/jsfiddles/create_room_send_msg/demo.js
@@ -19,7 +19,12 @@ $('.login').live('click', function() {
             showLoggedIn(data);
         },
         error: function(err) {
-            alert(JSON.stringify($.parseJSON(err.responseText)));  
+            var errMsg = "To try this, you need a home server running!";
+            var errJson = $.parseJSON(err.responseText);
+            if (errJson) {
+                errMsg = JSON.stringify(errJson);   
+            }
+            alert(errMsg);  
         }
     }); 
 });
diff --git a/jsfiddles/event_stream/demo.js b/jsfiddles/event_stream/demo.js
index 5c81e08caa..acba8391fa 100644
--- a/jsfiddles/event_stream/demo.js
+++ b/jsfiddles/event_stream/demo.js
@@ -58,7 +58,12 @@ $('.login').live('click', function() {
             showLoggedIn(data);
         },
         error: function(err) {
-            alert(JSON.stringify($.parseJSON(err.responseText)));  
+            var errMsg = "To try this, you need a home server running!";
+            var errJson = $.parseJSON(err.responseText);
+            if (errJson) {
+                errMsg = JSON.stringify(errJson);   
+            }
+            alert(errMsg);  
         }
     }); 
 });
diff --git a/jsfiddles/example_app/demo.details b/jsfiddles/example_app/demo.details
new file mode 100644
index 0000000000..3f96d3e744
--- /dev/null
+++ b/jsfiddles/example_app/demo.details
@@ -0,0 +1,7 @@
+ name: Example Matrix Client
+ description: Includes login, live event streaming, creating rooms, sending messages and viewing member lists.
+ authors:
+   - matrix.org
+ resources:
+   - http://matrix.org
+ normalize_css: no
\ No newline at end of file
diff --git a/jsfiddles/register_login/demo.js b/jsfiddles/register_login/demo.js
index 9595039173..fffa9e0551 100644
--- a/jsfiddles/register_login/demo.js
+++ b/jsfiddles/register_login/demo.js
@@ -20,7 +20,12 @@ $('.register').live('click', function() {
             showLoggedIn(data);
         },
         error: function(err) {
-            alert(JSON.stringify($.parseJSON(err.responseText)));  
+            var errMsg = "To try this, you need a home server running!";
+            var errJson = $.parseJSON(err.responseText);
+            if (errJson) {
+                errMsg = JSON.stringify(errJson);   
+            }
+            alert(errMsg);   
         }
     });
 });
@@ -36,7 +41,12 @@ var login = function(user, password) {
             showLoggedIn(data);
         },
         error: function(err) {
-            alert(JSON.stringify($.parseJSON(err.responseText)));  
+            var errMsg = "To try this, you need a home server running!";
+            var errJson = $.parseJSON(err.responseText);
+            if (errJson) {
+                errMsg = JSON.stringify(errJson);   
+            }
+            alert(errMsg);  
         }
     });  
 };
diff --git a/jsfiddles/room_memberships/demo.js b/jsfiddles/room_memberships/demo.js
index 64ba767138..8a7b1aa88e 100644
--- a/jsfiddles/room_memberships/demo.js
+++ b/jsfiddles/room_memberships/demo.js
@@ -28,7 +28,12 @@ $('.login').live('click', function() {
             showLoggedIn(data);
         },
         error: function(err) {
-            alert(JSON.stringify($.parseJSON(err.responseText)));  
+            var errMsg = "To try this, you need a home server running!";
+            var errJson = $.parseJSON(err.responseText);
+            if (errJson) {
+                errMsg = JSON.stringify(errJson);   
+            }
+            alert(errMsg); 
         }
     }); 
 });