| changeset 420 | eb7c2cff1816 |
| parent 419 | ad151a86046f |
| child 421 | c8db83b70def |
| 419:ad151a86046f | 420:eb7c2cff1816 |
|---|---|
1 function connectTweets() { |
|
2 $.getJSON('http://' + document.location.hostname + ':8888/?callback=?', function(data) { |
|
3 loadTweets(data.tweets) |
|
4 } ); |
|
5 |
|
6 setInterval(function() { |
|
7 if (!twCx.tweets) { |
|
8 return; |
|
9 } |
|
10 $.getJSON('http://' + document.location.hostname + ':8888/?after_id=' + twCx.tweets[twCx.tweets.length - 1].id + '&callback=?', function(data) { |
|
11 loadTweets(data.tweets, true); |
|
12 }); |
|
13 }, 1000) |
|
14 } |