DG IZ; fixed javascript bug. stream fades in recents again.
This commit is contained in:
parent
25198a7e86
commit
44b25e3eaa
1 changed files with 9 additions and 10 deletions
|
|
@ -30,17 +30,16 @@
|
|||
ws = new WebSocket("ws://#{request.host}:8080/");
|
||||
ws.onmessage = function(evt) {
|
||||
var obj = jQuery.parseJSON(evt.data);
|
||||
if((location.href.indexOf(obj['class']) != -1 ) || (location.pathname == '/')) {
|
||||
$("#stream").prepend($(obj['html']).fadeIn("fast"));
|
||||
};
|
||||
}
|
||||
ws.onclose = function() { debug("socket closed"); };
|
||||
ws.onopen = function() {
|
||||
ws.send(location.pathname);
|
||||
debug("connected...");
|
||||
};
|
||||
if((location.href.indexOf(obj['class']) != -1 ) || (location.pathname == '/')) {
|
||||
$("#stream").prepend($(obj['html']).fadeIn("fast"));
|
||||
};
|
||||
};
|
||||
ws.onclose = function() { debug("socket closed"); };
|
||||
ws.onopen = function() {
|
||||
ws.send(location.pathname);
|
||||
debug("connected...");
|
||||
};
|
||||
});
|
||||
});
|
||||
%body
|
||||
- flash.each do |name, msg|
|
||||
= content_tag :div, msg, :id => "flash_#{name}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue