From c58b58114af82a202dc197f8af67a761f2186bf1 Mon Sep 17 00:00:00 2001 From: SkyArrow Date: Sat, 11 Feb 2012 13:33:53 +0800 Subject: twitter: exclude replies --- source/_includes/banner.html | 2 +- source/javascripts/twitter.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/_includes/banner.html b/source/_includes/banner.html index 30fd246..f91ce3b 100644 --- a/source/_includes/banner.html +++ b/source/_includes/banner.html @@ -9,7 +9,7 @@ {% endif %} \ No newline at end of file diff --git a/source/javascripts/twitter.js b/source/javascripts/twitter.js index c39bb25..00ecc36 100644 --- a/source/javascripts/twitter.js +++ b/source/javascripts/twitter.js @@ -1,5 +1,5 @@ (function($){ - $.fn.getTwitterFeed = function(userid, count){ + $.fn.getTwitterFeed = function(userid, count, reply){ var banner = $(this), feed = banner.find('.feed'), interval = 10000, @@ -52,9 +52,9 @@ } if ($(window).width() > 600){ + var url = 'https://api.twitter.com/1/statuses/user_timeline/'+userid+'.json?count='+count+'&exclude_replies='+(reply ? '0' : '1')+'&trim_user=true&callback=?'; banner.show(); - - $.getJSON('https://api.twitter.com/1/statuses/user_timeline/'+userid+'.json?count='+count+'&trim_user=true&callback=?', function(json){ + $.getJSON(url, function(json){ var length = json.length, fragment = document.createDocumentFragment(), counts = 0, -- cgit v1.1-2-g2b99