Skip to content

Commit

Permalink
remove whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaker Gilbert authored and Shaker Gilbert committed Dec 1, 2024
1 parent 22ca6cb commit 25fd35a
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TLS Reader Results</title>
<title>TLS Inspection Results</title>
<style>
body {
display: flex;
Expand All @@ -27,7 +27,6 @@
.pass {
color: green;
}
/* Spinner Styles */
.spinner {
display: none;
width: 40px;
Expand All @@ -45,7 +44,7 @@
</style>
</head>
<body>
<h1>TLS Reader Results</h1>
<h1>TLS Inspection Results</h1>
<div>
<input type="text" id="hostname" placeholder="Enter hostname" />
<button id="runButton">Run</button>
Expand All @@ -57,7 +56,10 @@ <h1>TLS Reader Results</h1>
document.getElementById('runButton').addEventListener('click', runTest);

async function runTest() {
const hostname = document.getElementById('hostname').value.trim();
const hostnameInput = document.getElementById('hostname');
const hostname = hostnameInput.value.trim();
hostnameInput.value = hostname;

const spinner = document.getElementById('spinner');
const resultsDiv = document.getElementById('results');

Expand All @@ -66,12 +68,10 @@ <h1>TLS Reader Results</h1>
return;
}

// Show spinner
spinner.style.display = 'block';
resultsDiv.innerHTML = '';

try {
// Simulate delay
await new Promise(resolve => setTimeout(resolve, 3000));

const response = await fetch(`/results?hostname=${encodeURIComponent(hostname)}`);
Expand Down Expand Up @@ -116,7 +116,6 @@ <h1>TLS Reader Results</h1>
} catch (error) {
resultsDiv.textContent = `Error: ${error.message}`;
} finally {
// Hide spinner
spinner.style.display = 'none';
}
}
Expand Down

0 comments on commit 25fd35a

Please sign in to comment.