Initial commit.
This commit is contained in:
138
index.html
Normal file
138
index.html
Normal file
@@ -0,0 +1,138 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Demo Credentials</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
||||
line-height: 1.6;
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.container {
|
||||
background-color: white;
|
||||
padding: 2rem;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
max-width: 600px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #333;
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.credentials-box {
|
||||
background-color: #f8f9fa;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 4px;
|
||||
padding: 1.5rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.credentials-item {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-weight: 600;
|
||||
color: #495057;
|
||||
display: block;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.value {
|
||||
font-family: monospace;
|
||||
background-color: #e9ecef;
|
||||
padding: 0.5rem;
|
||||
border-radius: 4px;
|
||||
color: #212529;
|
||||
}
|
||||
|
||||
.continue-btn {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0.75rem;
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
font-size: 1rem;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
.continue-btn:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: #dc3545;
|
||||
text-align: center;
|
||||
margin-top: 1rem;
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>The demo you are trying to access requires user authentication for some features, please use the details below</h1>
|
||||
|
||||
<div class="credentials-box">
|
||||
<div class="credentials-item">
|
||||
<span class="label">Username</span>
|
||||
<div class="value">demo_user</div>
|
||||
</div>
|
||||
<div class="credentials-item">
|
||||
<span class="label">Password</span>
|
||||
<div class="value">demo1234</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="continue-btn" onclick="continueToDemoSite()">Continue to Demo</button>
|
||||
<div id="error-message" class="error">Invalid or missing target URL parameter</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function getTargetUrl() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const encodedTarget = urlParams.get('target');
|
||||
return encodedTarget ? decodeURIComponent(encodedTarget) : null;
|
||||
}
|
||||
|
||||
function continueToDemoSite() {
|
||||
const targetUrl = getTargetUrl();
|
||||
if (targetUrl) {
|
||||
try {
|
||||
// Basic URL validation
|
||||
new URL(targetUrl);
|
||||
window.location.href = targetUrl;
|
||||
} catch (e) {
|
||||
document.getElementById('error-message').style.display = 'block';
|
||||
}
|
||||
} else {
|
||||
document.getElementById('error-message').style.display = 'block';
|
||||
}
|
||||
}
|
||||
|
||||
// Check URL parameter on page load
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const targetUrl = getTargetUrl();
|
||||
if (!targetUrl) {
|
||||
document.getElementById('error-message').style.display = 'block';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user