File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
.themes/classic/source/javascripts Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ function linkifyTweet(text, url) {
4949 if ( url [ u ] . expanded_url != null ) {
5050 var shortUrl = new RegExp ( url [ u ] . url . replace ( / h t t p s ? : \/ \/ / , '' ) , 'g' ) ;
5151 text = text . replace ( shortUrl , url [ u ] . display_url ) ;
52- console . log ( text ) ;
5352 }
5453 }
5554 return text
@@ -66,11 +65,11 @@ function showTwitterFeed(tweets, twitter_user) {
6665}
6766
6867function getTwitterFeed ( user , count , replies ) {
68+ count = parseInt ( count , 10 ) ;
6969 $ . ajax ( {
70- url : "http://api.twitter.com/1/statuses/user_timeline/" + user + ".json?trim_user=true&count=" + ( parseInt ( count , 10 ) ) + "&include_entities=1&exclude_replies=" + ( replies ? "0" : "1" ) + "&callback=?"
70+ url : "http://api.twitter.com/1/statuses/user_timeline/" + user + ".json?trim_user=true&count=" + ( count + 20 ) + "&include_entities=1&exclude_replies=" + ( replies ? "0" : "1" ) + "&callback=?"
7171 , type : 'jsonp'
7272 , error : function ( err ) { $ ( '#tweets li.loading' ) . addClass ( 'error' ) . text ( "Twitter's busted" ) ; }
73- , success : function ( data ) { showTwitterFeed ( data , user ) ; }
73+ , success : function ( data ) { showTwitterFeed ( data . slice ( 0 , count ) , user ) ; }
7474 } )
7575}
76-
You can’t perform that action at this time.
0 commit comments