Only run when idle

This commit is contained in:
Lim Chee Aun 2023-11-05 08:26:51 +08:00
parent e5d5025299
commit 87d0b86ecb

View file

@ -84,6 +84,7 @@ window.__STATES_STATS__ = () => {
// Every 5 minutes
// Only posts for now
setInterval(() => {
if (!window.__IDLE__) return;
const { statuses } = states;
for (const key in statuses) {
const $post = document.querySelector(`[data-state-post-id~="${key}"]`);