tweetcast/client/js/connect-gevent.js
changeset 535 8276f3ff7a3f
parent 534 0a2505c3b547
child 536 5dd170a735e9
equal deleted inserted replaced
534:0a2505c3b547 535:8276f3ff7a3f
     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 }