Fix Frontend: Use addEventListener instead of onclick, add debug logs, cache bust

This commit is contained in:
2025-12-27 23:19:41 +11:00
parent f7a1f1be42
commit 04245e33ae
2 changed files with 12 additions and 2 deletions

View File

@@ -35,6 +35,7 @@ function setLoading(isLoading) {
// ============================================================================
async function runTest() {
console.log('Run Test triggered');
const urlInput = document.getElementById('test-url');
const url = urlInput.value.trim();
const errorMsg = document.getElementById('error-msg');
@@ -213,6 +214,15 @@ document.addEventListener('DOMContentLoaded', () => {
updateVersionBadge();
loadHistory();
// Attach event listener programmatically
const runBtn = document.getElementById('run-btn');
if (runBtn) {
runBtn.addEventListener('click', runTest);
console.log('Run Test button listener attached');
} else {
console.error('Run Test button not found');
}
// Auto-refresh Git badge
setInterval(updateVersionBadge, 5 * 60 * 1000);
});