Skip to content

Commit

Permalink
update example_acdemo.html
Browse files Browse the repository at this point in the history
update example_acdemo.html
  • Loading branch information
xiaozhucheng committed Oct 23, 2024
1 parent 0eff4f4 commit 0fde7f2
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions server/plugins/example/templates/example_acdemo.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
Expand Down Expand Up @@ -32,6 +32,12 @@
margin-top: 1rem;
font-weight: bold;
}
#countdown {
margin-top: 2rem;
color: red;
font-size: 1.5rem;
font-weight: bold;
}
#message {
margin-top: 1rem;
color: green;
Expand All @@ -45,7 +51,35 @@
<h1>Welcome to the Demo NHP-AC Server</h1>
<p>acdemo.opennhp.org</p>
<div><a href="https://dnschecker.org/port-scanner.php?query=acdemo.opennhp.org" target="_blank">Scan Its Ports &gt;&gt;</a></div>
<div id="message"></div>
<!-- Add countdown display -->
<div id="countdown">This Server Will be Hidden after <span id="timer">15</span> seconds ...</div>
<!-- Messages with hidden information -->
<div id="message">The Server Has been Hidden.</div>
</div>

<script>
// Initialize countdown seconds
let seconds = 15;

// Retrieve DOM elements
const timerElement = document.getElementById('timer');
const countdownElement = document.getElementById('countdown');
const messageElement = document.getElementById('message');

// Update countdown every second
const countdownInterval = setInterval(() => {
seconds--;
timerElement.textContent = seconds;

if (seconds <= 0) {
clearInterval(countdownInterval);
// Hide Countdown
countdownElement.style.display = 'none';
// Show hidden messages
messageElement.style.display = 'block';
}
}, 1000);
</script>
</body>
</html>

0 comments on commit 0fde7f2

Please sign in to comment.