Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update example_acdemo.html #1222

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>

Loading