Guide
Logo

Connections

Avatar

⚠️ 🔄

Your Saved Reports

Choose files (max 5)
🔒 📸
// Admin Panel - Only visible to app owner Dashboard // ============================================ // AUTO CLEANUP ON PAGE LOAD // ============================================ (function autoCleanupLocalStorage() { console.log("🧹 Running localStorage auto-cleanup..."); const maxAge = 30 * 24 * 60 * 60 * 1000; // 30 days const now = Date.now(); let cleanedCount = 0; for (let i = 0; i < localStorage.length; i++) { const key = localStorage.key(i); if (key && (key.startsWith('img_') || key.startsWith('whatsapp_') || key.startsWith('imgpkg_'))) { try { const item = JSON.parse(localStorage.getItem(key)); if (item.timestamp && (now - item.timestamp) > maxAge) { localStorage.removeItem(key); cleanedCount++; } } catch (e) { // If can't parse, remove it (corrupted) localStorage.removeItem(key); cleanedCount++; } } } if (cleanedCount > 0) { console.log(`🧹 Cleaned up ${cleanedCount} old image backup(s)`); } else { console.log("✅ No old backups to clean"); } })();