From cba176dab96871d8c38e0f065b7e62a079fa1b09 Mon Sep 17 00:00:00 2001 From: renato97 Date: Tue, 4 Nov 2025 05:41:25 +0000 Subject: [PATCH] Add error handling to debug button Added: - Console log when button is clicked - Console log showing button element - Try-catch wrapper around the function - Error logging with stack trace This will show if the button click is detected and where it fails! --- content.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/content.js b/content.js index f56cd82..9539782 100644 --- a/content.js +++ b/content.js @@ -111,7 +111,13 @@ if (btnDebugPages) { btnDebugPages.addEventListener('click', (e) => { console.log('🎯 BUTTON CLICKED: Debug Contar Páginas'); - debugCountPagesForAllManga(); + console.log('📝 Button element:', btnDebugPages); + try { + debugCountPagesForAllManga(); + } catch (error) { + console.error('❌❌❌ Error in debugCountPagesForAllManga:', error); + console.error('Stack:', error.stack); + } }); } else { console.error('❌ btnDebugPages not found!');