// jquery.tweet.js - See http://tweet.seaofclouds.com/ or https://github.com/seaofclouds/tweet for more info
// Copyright (c) 2008-2011 Todd Matthews & Steve Purcell
(function($){
$.fn.tweet=function(o){
vars=$.extend({
username:null,// [string or array] required unless using the 'query' option; one or more twitter screen names (use 'list' option for multiple names, where possible)
list:null,// [string] optional name of list belonging to username
favorites:false,// [boolean] display the user's favorites instead of his tweets
query:null,// [string] optional search query (see also: http://search.twitter.com/operators)
avatar_size:null,// [integer] height and width of avatar if displayed (48px max)
count:3,// [integer] how many tweets to display?
fetch:null,// [integer] how many tweets to fetch via the API (set this higher than 'count' if using the 'filter' option)
page:1,// [integer] which page of results to fetch (if count != fetch, you'll get unexpected results)
retweets:true,// [boolean] whether to fetch (official) retweets (not supported in all display modes)
intro_text:null,// [string] do you want text BEFORE your your tweets?
outro_text:null,// [string] do you want text AFTER your tweets?
join_text:null,// [string] optional text in between date and tweet, try setting to "auto"
auto_join_text_default:"i said,",// [string] auto text for non verb: "i said" bullocks
auto_join_text_ed:"i",// [string] auto text for past tense: "i" surfed
auto_join_text_ing:"i am",// [string] auto tense for present tense: "i was" surfing
auto_join_text_reply:"i replied to",// [string] auto tense for replies: "i replied to" @someone "with"
auto_join_text_url:"i was looking at",// [string] auto tense for urls: "i was looking at" http:...
loading_text:null,// [string] optional loading text, displayed while tweets load
refresh_interval:null,// [integer] optional number of seconds after which to reload tweets
twitter_url:"twitter.com",// [string] custom twitter url, if any (apigee, etc.)
twitter_api_url:"api.twitter.com",// [string] custom twitter api url, if any (apigee, etc.)
twitter_search_url:"search.twitter.com",// [string] custom twitter search url, if any (apigee, etc.)
template:"{avatar}{time}{join}{text}",// [string or function] template used to construct each tweet <li> - see code for available vars
comparator:function(tweet1,tweet2){// [function] comparator used to sort tweets (see Array.sort)
returntweet2["tweet_time"]-tweet1["tweet_time"];
},
filter:function(tweet){// [function] whether or not to include a particular tweet (be sure to also set 'fetch')
returntrue;
}
},o);
// See http://daringfireball.net/2010/07/improved_regex_for_matching_urls