Working live tweets and filtering tweets

This commit is contained in:
2022-11-03 14:17:50 +01:00
parent 15f3910843
commit 1932afe5f8
4 changed files with 17 additions and 5 deletions

View File

@@ -74,10 +74,10 @@ block.fn.tweets = function(config) {
// store list for later
// var $list = $("div.tweetcontainer");
var $list = document.querySelector("#latest")
window.sessionStorage.setItem('tweets', JSON.stringify([]));
// register default handler for handling tweet data
this.actions(function(e, tweet){
$(window).trigger("filter");
tweets = window.sessionStorage.getItem('tweets');
tweets = JSON.parse(tweets);
tweets.push(tweet);