Commented + Tidying Up

This commit is contained in:
jacktjong
2022-11-04 22:40:38 +01:00
parent f840a456af
commit e3e7ad4c7d
5 changed files with 23 additions and 24 deletions

View File

@@ -87,11 +87,11 @@ block.fn.tweets = function(config) {
}
window.sessionStorage.setItem('tweets', JSON.stringify(tweets));
if(!paused) {
// remove tweets
$list.replaceChildren();
var displayTweets = tweets.reverse().slice(0, options.memory).reverse();
for (i = 0; i < Math.min(options.memory-1, displayTweets.length); i++){
$list.prepend(tweetCell(displayTweets[i]));
// remove tweets
$list.replaceChildren();
var displayTweets = tweets.reverse().slice(0, options.memory).reverse();
for (i = 0; i < Math.min(options.memory-1, displayTweets.length); i++){
$list.prepend(tweetCell(displayTweets[i]));
}
}