mirror of
https://github.com/DeNNiiInc/Web-Page-Performance-Test.git
synced 2026-04-17 20:05:58 +00:00
Fix Frontend: Use addEventListener instead of onclick, add debug logs, cache bust
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
<meta name="description" content="Beyond Cloud Technology Project Base">
|
<meta name="description" content="Beyond Cloud Technology Project Base">
|
||||||
<title>Beyond Cloud Technology - Project Base</title>
|
<title>Beyond Cloud Technology - Project Base</title>
|
||||||
<link rel="icon" type="image/png" href="Logo.png">
|
<link rel="icon" type="image/png" href="Logo.png">
|
||||||
<link rel="stylesheet" href="styles.css?v=2.1">
|
<link rel="stylesheet" href="styles.css?v=2.2">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button id="run-btn" class="btn-primary" onclick="runTest()">
|
<button id="run-btn" class="btn-primary">
|
||||||
<span>Run Test</span>
|
<span>Run Test</span>
|
||||||
<div id="loading-spinner" class="loading-spinner" style="display: none;"></div>
|
<div id="loading-spinner" class="loading-spinner" style="display: none;"></div>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
10
script.js
10
script.js
@@ -35,6 +35,7 @@ function setLoading(isLoading) {
|
|||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
async function runTest() {
|
async function runTest() {
|
||||||
|
console.log('Run Test triggered');
|
||||||
const urlInput = document.getElementById('test-url');
|
const urlInput = document.getElementById('test-url');
|
||||||
const url = urlInput.value.trim();
|
const url = urlInput.value.trim();
|
||||||
const errorMsg = document.getElementById('error-msg');
|
const errorMsg = document.getElementById('error-msg');
|
||||||
@@ -213,6 +214,15 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
updateVersionBadge();
|
updateVersionBadge();
|
||||||
loadHistory();
|
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
|
// Auto-refresh Git badge
|
||||||
setInterval(updateVersionBadge, 5 * 60 * 1000);
|
setInterval(updateVersionBadge, 5 * 60 * 1000);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user