My Enhancements include:
- #hashtag link creation
- In Reply To support (shows who I'm replying to and a link to their status like twitter.com)
- via support (again like twitter.com, shows from what client I posted)
function twitterCallback(twitters) { var statusHTML = []; for (var i=0; i<twitters.length; i++){ var username = twitters[i].user.screen_name; var source = twitters[i].source; var status = twitters[i].text.replace(/((https?|s?ftp|ssh)\:\/\/[^"\s\<\>]*[^.,;'">\:\s\<\>\)\]\!])/g, function(url) { return ''+url+''; }).replace(/\B@([_a-z0-9]+)/ig, function(reply) { return reply.charAt(0)+''+reply.substring(1)+''; }).replace(/\B#([_a-z0-9]+)/ig, function(hashtag) { return ''+hashtag+''; }); if (twitters[i].in_reply_to_screen_name != null) { var replyto = twitters[i].in_reply_to_screen_name; var replystatus = twitters[i].in_reply_to_status_id; var inreplyto = 'in reply to '+replyto+''; } else { var inreplyto = ''; } statusHTML.push('
No comments:
Post a Comment