diff --git a/layouts/home/script.js b/layouts/home/script.js index 190f6f79..769ae3d2 100644 --- a/layouts/home/script.js +++ b/layouts/home/script.js @@ -82,6 +82,23 @@ setTimeout(() => { + Updates you may have already received: +

Want to support me? You can donate, follow me or leave a review.
diff --git a/manifest.json b/manifest.json index 1a0e309b..53efdd4c 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "Old Twitter Layout (2023)", "description": "__MSG_ext_description__", - "version": "1.8.0.5", + "version": "1.8.1", "manifest_version": 3, "homepage_url": "https://github.com/dimdenGD/OldTwitter", "background": { diff --git a/scripts/apis.js b/scripts/apis.js index 527b6f03..5b13f39f 100644 --- a/scripts/apis.js +++ b/scripts/apis.js @@ -18,8 +18,16 @@ setInterval(() => { chrome.storage.local.set({trends: {}}, () => {}); chrome.storage.local.set({trendsv2: {}}, () => {}); - tweetStorage = tweetStorage.filter(t => t.cacheDate && Date.now() - t.cacheDate < 60000*15); - userStorage = userStorage.filter(t => t.cacheDate && Date.now() - t.cacheDate < 60000*15); + for(let i in tweetStorage) { + if(tweetStorage[i].cacheDate && Date.now() - tweetStorage[i].cacheDate > 60000*15) { + delete tweetStorage[i]; + } + } + for(let i in userStorage) { + if(userStorage[i].cacheDate && Date.now() - userStorage[i].cacheDate > 60000*15) { + delete userStorage[i]; + } + } }, 60000*10); setInterval(() => {