aboutsummaryrefslogtreecommitdiff
path: root/source/javascripts
diff options
context:
space:
mode:
authorB Mathis <brandon@imathis.com>2009-11-07 12:05:10 -0600
committerB Mathis <brandon@imathis.com>2009-11-07 12:05:10 -0600
commit24c5fedcbca655b0d2c32ccba7a63357daab7d05 (patch)
treeda788728177e933a513fa49eeefc6939444ad7ef /source/javascripts
parent69379ab044fd4b06f36ebade76ed41b5f4f2a67c (diff)
downloadmy_new_personal_website-24c5fedcbca655b0d2c32ccba7a63357daab7d05.tar.xz
my_new_personal_website-24c5fedcbca655b0d2c32ccba7a63357daab7d05.zip
udpated thirdparty integration, it is now conditionally added, updated readme
Diffstat (limited to '')
-rw-r--r--source/javascripts/twitter.js10
1 files changed, 4 insertions, 6 deletions
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, '<br/>');
console.log(tweet);