From abb8c77e3fd49f161ac0775e71eea9273d970263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20Hn=C3=A1t?= Date: Wed, 2 Nov 2022 11:42:29 +0100 Subject: [PATCH] Changed the number of tweets stored in local memory --- dashboard_static/lib/tweets.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dashboard_static/lib/tweets.js b/dashboard_static/lib/tweets.js index 6cc4642..c8f89a1 100644 --- a/dashboard_static/lib/tweets.js +++ b/dashboard_static/lib/tweets.js @@ -83,7 +83,8 @@ block.fn.tweets = function(config) { tweets = window.sessionStorage.getItem('tweets'); tweets = JSON.parse(tweets); tweets.push(tweet); - if(tweets.length >= options.memory) { + var localMemory = 100; + if(tweets.length >= localMemory) { tweets.shift(); } window.sessionStorage.setItem('tweets', JSON.stringify(tweets));