Fix selected count updating in control panel

 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!
This commit is contained in:
renato97
2025-11-04 05:19:57 +00:00
parent 54563424b4
commit 771b001923

View File

@@ -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