Skip to content

Instantly share code, notes, and snippets.

@toffer
Created March 27, 2009 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toffer/86924 to your computer and use it in GitHub Desktop.
Save toffer/86924 to your computer and use it in GitHub Desktop.
function twitterCallback2(C)
{
var A = [];
for (var D = 0; D < C.length; ++D)
{
var E = C[D].user.screen_name;
var B = C[D].text.replace(/((https?|s?ftp|ssh)\:\/\/[^"\s\<\>]*[^.,;'">\:\s\<\>\)\]\!])/g, function (F)
{
return "<a href=\"" + F + "\">" + F + "</a>";
}).replace(/\B@([_a-z0-9]+)/ig, function (F)
{
return F.charAt(0) + "<a href=\"http://www.twitter.com/" + F.substring(1) +
"\">" + F.substring(1) + "</a>";
});
A.push("<li><span>" + B + "</span> <a style=\"font-size:85%\" href=\"http://twitter.com/"
+ E + "/statuses/" + C[D].id + "\">" + relative_time(C[D].created_at) + "</a></li>");
}
document.getElementById(E + "_twitter_updates").innerHTML = A.join("");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment