Improved the whitespace formatting for tweets where there are lots of
consecutive new lines
This commit is contained in:
parent
51d1821930
commit
901f4d7f29
@ -26,7 +26,7 @@ function showTwitterFeed(tweets, twitter_user){
|
|||||||
var timeline = document.getElementById('tweets');
|
var timeline = document.getElementById('tweets');
|
||||||
timeline.innerHTML='';
|
timeline.innerHTML='';
|
||||||
for (t in tweets){
|
for (t in tweets){
|
||||||
timeline.innerHTML+='<li>'+'<p>'+'<a href="http://twitter.com/'+twitter_user+'/status/'+tweets[t].id_str+'">'+prettyDate(tweets[t].created_at)+'</a>'+linkifyTweet(tweets[t].text.replace(/\n{2}/, '</p><p>').replace(/\n/, '<br>'))+'</p>'+'</li>';
|
timeline.innerHTML+='<li>'+'<p>'+'<a href="http://twitter.com/'+twitter_user+'/status/'+tweets[t].id_str+'">'+prettyDate(tweets[t].created_at)+'</a>'+linkifyTweet(tweets[t].text.replace(/\n/g, '<br>'))+'</p>'+'</li>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function linkifyTweet(text){
|
function linkifyTweet(text){
|
||||||
|
Loading…
Reference in New Issue
Block a user