From 24c5fedcbca655b0d2c32ccba7a63357daab7d05 Mon Sep 17 00:00:00 2001 From: B Mathis Date: Sat, 7 Nov 2009 12:05:10 -0600 Subject: udpated thirdparty integration, it is now conditionally added, updated readme --- source/javascripts/twitter.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'source/javascripts') diff --git a/source/javascripts/twitter.js b/source/javascripts/twitter.js index 7ba2fc23..ffda0734 100644 --- a/source/javascripts/twitter.js +++ b/source/javascripts/twitter.js @@ -6,13 +6,11 @@ // PrettyDate by John Resig at http://ejohn.org/files/pretty.js // -var filter_mentions = true; -var tweet_count = 5; var tweet_tag = 'p'; var twitter_div = 'twitter_status'; window.addEvent('domready',function() { - getTwitterStatus('imathis'); + getTwitterStatus(twitter_user); }); function showTweets(the_tweets, from_cookie){ @@ -53,15 +51,15 @@ function prettyDate(time){ } function getTwitterStatus(twitter_name){ - var tweet_cookie = 'tweets_by_' + twitter_name; + var tweet_cookie = 'tweets_by_' + twitter_name + tweet_count; $(twitter_div).set('html', 'Fetching tweets...'); if(!Cookie.read(tweet_cookie)) { var myTwitterGitter = new TwitterGitter(twitter_name,{ - count: ((!filter_mentions) ? tweet_count : 15 + tweet_count), + count: ((show_replies) ? tweet_count : 15 + tweet_count), onComplete: function(tweets,user) { the_tweets = Array(); tweets.each(function(tweet,i) { - if((tweet.in_reply_to_status_id && !filter_mentions) || !tweet.in_reply_to_status_id){ + if((tweet.in_reply_to_status_id && show_replies) || !tweet.in_reply_to_status_id){ if(the_tweets.length == tweet_count) return; tweet.text = tweet.text.replace(/\n/gi, '
'); console.log(tweet); -- cgit v1.2.1