commit 2d9be255356835b5fc8046071477f7a1244cc385 Author: Arkadiusz Miƛkiewicz Date: Wed Nov 8 21:22:57 2017 +0100 Show new, 280 characters long, tweets. diff --git a/lib/popup/global.js b/lib/popup/global.js index f170c2c..f51740f 100644 --- a/lib/popup/global.js +++ b/lib/popup/global.js @@ -1,4 +1,4 @@ -var MAX_TWEET_SIZE = 140; +var MAX_TWEET_SIZE = 280; var backgroundPage = chrome.extension.getBackgroundPage(); var Persistence = backgroundPage.Persistence; @@ -33,4 +33,4 @@ if(microbloggingService == 'twitter') { if(backgroundPage.SecretKeys.hasValidKeys() && !twitterBackend.authenticated() && !twitterBackend.tokenRequested()) { twitterBackend.startAuthentication(); window.close(); -} \ No newline at end of file +} diff --git a/lib/timelines/timeline.js b/lib/timelines/timeline.js index de3799f..11d0294 100644 --- a/lib/timelines/timeline.js +++ b/lib/timelines/timeline.js @@ -518,4 +518,4 @@ TweetsTimeline.prototype = { delete this.canceledRequests[requestId]; return isCanceled; } -}; \ No newline at end of file +}; diff --git a/lib/tweets_assembler.js b/lib/tweets_assembler.js index 7b387a3..a32c622 100644 --- a/lib/tweets_assembler.js +++ b/lib/tweets_assembler.js @@ -368,13 +368,13 @@ var Renderer = { renderTweet: function (tweet, useColors, nameAttribute) { var user = tweet.user; - var text = tweet.text; + var text = tweet.full_text; var tweetId = tweet.id; var entities = tweet.entities; if(tweet.retweeted_status) { user = tweet.retweeted_status.user; - text = tweet.retweeted_status.text; + text = tweet.retweeted_status.full_text; tweetId = tweet.retweeted_status.id; entities = tweet.retweeted_status.entities; } @@ -388,7 +388,7 @@ var Renderer = { /* if(tweet.retweeted_status) { user = tweet.retweeted_status.user; - text = tweet.retweeted_status.text; + text = tweet.retweeted_status.full_text; tweetId = tweet.retweeted_status.id; } var content = this.transformTweetText(text); diff --git a/lib/twitter_lib.js b/lib/twitter_lib.js index 180bca1..764d624 100644 --- a/lib/twitter_lib.js +++ b/lib/twitter_lib.js @@ -279,16 +279,18 @@ TwitterLib.prototype = { }, showConversation: function(callback, id) { /// - var params = { include_entities: 1 }; + var params = { include_entities: 1, tweet_mode: 'extended' }; this.ajaxRequest('related_results/show/' + id, callback, null, params, "GET", false); }, showTweet: function(callback, id) { - this.ajaxRequest('statuses/show/' + id, callback, null, null, "GET", false); + var params = { tweet_mode: 'extended' }; + this.ajaxRequest('statuses/show/' + id, callback, null, params, "GET", false); }, tweet: function(callback, msg, replyId) { var params = { status: msg }; + params.tweet_mode = 'extended'; if(replyId) { params.in_reply_to_status_id = replyId; } @@ -326,6 +328,7 @@ TwitterLib.prototype = { timeline: function(timeline_path, callback, context, params) { params = params || {}; params.include_entities = 'true'; + params.tweet_mode = 'extended'; this.ajaxRequest(timeline_path, callback, context, params); }, @@ -363,6 +366,7 @@ TwitterLib.prototype = { usersTimeline: function(callback, params) { params.include_rts = 'true'; params.include_my_retweet = 'true'; + params.tweet_mode = 'extended'; this.ajaxRequest('statuses/user_timeline', callback, {}, params); },