This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function.prototype.curry = function curry() { | |
var fn = this, args = Array.prototype.slice.call(arguments); | |
return function curryed() { | |
return fn.apply(this, args.concat(Array.prototype.slice.call(arguments))); | |
}; | |
}; | |
// pulled from this stackoverflow.com post http://stackoverflow.com/questions/4674021/xhr-get-request-url-in-onreadystatechange |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var date = new Date(Date.parse(twitter_response[0].created_at.replace(/( \+)/, ' UTC$1'))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.prototype.linkify_tweet = function() { | |
var tweet = this.replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,"<a href='$1'>$1</a>"); | |
tweet = tweet.replace(/(^|\s)@(\w+)/g, "$1<a href=\"http://www.twitter.com/$2\">@$2</a>"); | |
return tweet.replace(/(^|\s)#(\w+)/g, "$1<a href=\"http://search.twitter.com/search?q=%23$2\">#$2</a>"); | |
}; |
NewerOlder