summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/_includes/banner.html2
-rw-r--r--source/javascripts/twitter.js6
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 @@
<script src="{{ root_url }}/javascripts/twitter.js"></script>
<script type="text/javascript">
(function($){
- $('#banner').getTwitterFeed('{{ site.twitter_user }}', {{ site.twitter_tweet_count }});
+ $('#banner').getTwitterFeed('{{ site.twitter_user }}', {{ site.twitter_tweet_count }}, {{ site.twitter_show_replies }});
})(jQuery);
</script>
{% 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,