| 14684 | console.log(`⚠️ No saved state found for ${ip}, keeping default button state`); |
| 14685 | } |
| 14686 | } |
| 14687 | |
| 14688 | function clearDeepScanButtonState(ip) { |
| 14689 | if (deepScanButtonStates.has(ip)) { |
| 14690 | deepScanButtonStates.delete(ip); |
| 14691 | console.log(`🗑️ Cleared deep scan button state for ${ip}`); |
| 14692 | } |
| 14693 | } |
| 14694 | |
| 14695 | function cleanupOldDeepScanStates() { |
| 14696 | // Remove states for IPs that no longer have buttons in the DOM |
| 14697 | let cleanedCount = 0; |
| 14698 | for (const [ip] of deepScanButtonStates) { |
| 14699 | const buttonId = `deep-scan-btn-${ip.replace(/\./g, '-')}`; |
| 14700 | if (!document.getElementById(buttonId)) { |