diff --git a/__pycache__/dashboard.cpython-310.pyc b/__pycache__/dashboard.cpython-310.pyc index 8e88d60..ef5ec2f 100644 Binary files a/__pycache__/dashboard.cpython-310.pyc and b/__pycache__/dashboard.cpython-310.pyc differ diff --git a/dashboard_static/lib/tweets.js b/dashboard_static/lib/tweets.js index 52bb011..94bc051 100644 --- a/dashboard_static/lib/tweets.js +++ b/dashboard_static/lib/tweets.js @@ -68,12 +68,12 @@ var process_entities = function(message, entities) { block.fn.tweets = function(config) { var options = $.extend({ - memory: 100 + memory: 20 }, config); // store list for later - var $list = $("div.tweetcontainer"); - console.log(this.$element.find("div")) + // var $list = $("div.tweetcontainer"); + var $list = document.querySelector("#latest") // register default handler for handling tweet data this.actions(function(e, tweet){ @@ -86,16 +86,19 @@ block.fn.tweets = function(config) { } window.sessionStorage.setItem('tweets', JSON.stringify(tweets)); + // remove stale tweets + // if ($list.childElementCount > options.memory) { + // console.log("Deleted") + // // delete last child element + // // $list.removeChild($list.lastChild); + // } + $list.replaceChildren(); // tweets = filterTweets(tweets, filters.blockedWords, filters.searchedWords + filters.sports, filters.sorted, filters.order); // tweets = sortTweets(tweets); - for (i = 0; i < tweets.length; i++){ + for (i = 0; i < options.memory-1; i++){ $list.prepend(tweetCell(tweets[i])); } - // remove stale tweets - if ($list.children().length > options.memory) { - $list.children().last().remove(); - } }); return this.$element; diff --git a/eca/__pycache__/arff.cpython-310.pyc b/eca/__pycache__/arff.cpython-310.pyc index dab7427..1516621 100644 Binary files a/eca/__pycache__/arff.cpython-310.pyc and b/eca/__pycache__/arff.cpython-310.pyc differ diff --git a/eca/__pycache__/generators.cpython-310.pyc b/eca/__pycache__/generators.cpython-310.pyc index 01498c6..155bc4d 100644 Binary files a/eca/__pycache__/generators.cpython-310.pyc and b/eca/__pycache__/generators.cpython-310.pyc differ