tweetcast/nodejs/client/js/script.js
changeset 334 b7f05d66b620
parent 333 4389fd4ae58f
child 335 5f83c21dee69
equal deleted inserted replaced
333:4389fd4ae58f 334:b7f05d66b620
   271 }
   271 }
   272 
   272 
   273 $(document).ready(function() {
   273 $(document).ready(function() {
   274     tlPaper = Raphael("timeline", 220, 600);
   274     tlPaper = Raphael("timeline", 220, 600);
   275     twPaper = Raphael("timewindow", 220, 600);
   275     twPaper = Raphael("timewindow", 220, 600);
   276     socket = io.connect('http://' + S_IO_HOST + ':' + S_IO_PORT );
   276     socket = io.connect('http://' + document.location.hostname );
   277     socket.on('tweetSummary', function (data) {
   277     socket.on('tweetSummary', function (data) {
   278         if (tweetData.tweetcount != data.tweetcount) {
   278         if (tweetData.tweetcount != data.tweetcount) {
   279             tweetData.tweetcount = data.tweetcount;
   279             tweetData.tweetcount = data.tweetcount;
   280             tweetData.tlChanged = true;
   280             tweetData.tlChanged = true;
   281             if (tweetData.followLast) {
   281             if (tweetData.followLast) {