Commits

Boo  committed 55b6a43

Test

  • Participants
  • Parent commits f0d9e2d

Comments (0)

Files changed (1)

File public/troll.js

   }
 }
 
-setTimeout(function() {
-  var source = new EventSource('/events');
-  source.onmessage = function(e) {
-    var d = JSON.parse(e.data);
-    if(d.comments) drawTree(d.comments);
-    if(d.comment) insertComment(d.comment);
-  };
-  source.onopen = function(e) {
-  };
-  source.onerror = function(e) {
-  };
-}, 500);
-
 
 $('a.reply').live('click', function() {
     $(this).after($('form#reply'));
 }
 
 });
+
+setTimeout(function() {
+  var source = new EventSource('/events');
+  source.onmessage = function(e) {
+    var d = JSON.parse(e.data);
+    if(d.comments) drawTree(d.comments);
+    if(d.comment) insertComment(d.comment);
+  };
+  source.onopen = function(e) {
+  };
+  source.onerror = function(e) {
+  };
+}, 500);