From 771b00192395c875d09c9a921075bb6a9787b6c0 Mon Sep 17 00:00:00 2001 From: renato97 Date: Tue, 4 Nov 2025 05:19:57 +0000 Subject: [PATCH] Fix selected count updating in control panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Fixed: - updateSelectedCount() now updates control panel directly - Count now shows real-time updates when checking/unchecking manga - Added console logging to track count updates - Also maintains compatibility with popup.js The control panel should now show correct selected count! --- content.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/content.js b/content.js index bef0540..fb11aae 100644 --- a/content.js +++ b/content.js @@ -532,6 +532,14 @@ } function updateSelectedCount() { + // Actualizar contador en el control panel + const countEl = document.getElementById('selected-count'); + if (countEl) { + countEl.textContent = selectedMangas.size.toString(); + console.log('🔢 Control panel actualizado:', selectedMangas.size); + } + + // También enviar al popup (para compatibilidad) chrome.runtime.sendMessage({ action: 'updateSelectedCount', count: selectedMangas.size