Certainly! I've added the requested fixes and optimizations to your code. Specifically, when termination is triggered, any open modals (like the admin login modal) will close, and the termination modal will display, indicating that the user has been terminated.
html Copy code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Highly-Classified Documentary: Mobile Task Force Omega-1 (“The Vanguard”)</title>
<style>
/* General Styles */
body {
background-color: #ffffff;
color: #000000;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
margin: 0;
padding: 0;
overflow-x: hidden;
}
.container {
width: 90%;
max-width: 1200px;
margin: 80px auto 50px auto;
padding: 20px;
background-color: #f9f9f9;
border: 1px solid #ccc;
box-shadow: 0 0 15px rgba(0,0,0,0.1);
border-radius: 8px;
opacity: 0;
animation: fadeIn 2s forwards;
}
h1, h2, h3, h4, h5, h6 {
color: #000000;
margin-top: 20px;
margin-bottom: 10px;
animation: slideIn 1s forwards;
}
p, ul, li {
animation: fadeIn 2s forwards;
}
hr {
border: 0;
height: 1px;
background: #ccc;
margin: 30px 0;
animation: fadeIn 2s forwards;
}
strong {
font-weight: bold;
color: #000000;
}
a {
color: #990000;
text-decoration: none;
position: relative;
}
a:hover {
text-decoration: underline;
}
/* Redacted Text */
.redacted {
background-color: #000;
color: #000;
border-radius: 3px;
padding: 0 5px;
font-weight: bold;
cursor: pointer;
position: relative;
transition: background-color 0.3s ease;
}
.redacted:hover {
background-color: #444;
}
.redacted:hover::after {
content: attr(data-reveal);
position: absolute;
left: 0;
top: 100%;
color: #fff;
background: rgba(0, 0, 0, 0.9);
padding: 5px;
border-radius: 3px;
white-space: nowrap;
z-index: 100;
}
/* Protection Notice */
.protection {
position: fixed;
top: 0;
left: 0;
width: 100%;
background-color: #f8f8f8;
color: #333;
text-align: center;
padding: 15px 0;
z-index: 1000;
font-size: 1.1em;
animation: slideDown 1s forwards;
}
.protection a {
color: #990000;
margin-left: 10px;
}
/* Hidden Content with Blockage */
.hidden-content {
position: relative;
background-color: #eaeaea;
padding: 10px;
border-radius: 5px;
overflow: hidden;
max-height: 0;
transition: max-height 0.5s ease;
}
.hidden-content.expanded {
max-height: 1000px;
}
.toggle-button {
display: block;
width: 100%;
text-align: center;
margin: 10px 0;
padding: 10px;
background-color: #990000;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.toggle-button:hover {
background-color: #7a0000;
}
/* Animations */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes slideIn {
from { transform: translateX(-50px); opacity: 0; }
to { transform: translateX(0); opacity: 1; }
}
@keyframes slideDown {
from { top: -50px; }
to { top: 0; }
}
/* Footer */
.footer {
text-align: center;
margin-top: 50px;
font-size: 0.9em;
color: #555;
border-top: 1px solid #ccc;
padding-top: 20px;
animation: fadeIn 2s forwards;
}
/* Hover Effects */
ul li:hover {
background-color: #f0f0f0;
transition: background-color 0.3s ease;
}
/* Responsive Design */
@media (max-width: 768px) {
.container {
width: 95%;
margin: 80px auto 30px auto;
}
.protection {
font-size: 1em;
}
}
/* Admin Modal Styles */
.modal {
display: none;
position: fixed;
z-index: 2000;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0,0,0,0.8);
}
.modal-content {
background-color: #fefefe;
margin: 10% auto;
padding: 20px;
border: 1px solid #888;
width: 80%;
max-width: 500px;
border-radius: 8px;
animation: fadeIn 0.5s;
}
.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
cursor: pointer;
}
.close:hover,
.close:focus {
color: black;
}
.admin-button {
position: fixed;
top: 20px;
right: 20px;
background-color: #007BFF;
color: #fff;
border: none;
padding: 10px 15px;
border-radius: 5px;
cursor: pointer;
z-index: 1500;
transition: background-color 0.3s ease;
}
.admin-button:hover {
background-color: #0056b3;
}
/* Admin Dashboard Styles */
.admin-dashboard {
display: none;
}
.admin-dashboard.active {
display: block;
}
.admin-section {
margin-bottom: 20px;
}
.admin-section label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
.admin-section input,
.admin-section textarea {
width: 100%;
padding: 8px;
margin-bottom: 10px;
border-radius: 4px;
border: 1px solid #ccc;
}
.admin-section button {
background-color: #28a745;
color: #fff;
border: none;
padding: 10px 15px;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.admin-section button:hover {
background-color: #218838;
}
/* Notification Styles */
.notification {
display: none;
position: fixed;
top: 10px;
right: 10px;
background-color: #28a745;
color: #fff;
padding: 15px 20px;
border-radius: 5px;
z-index: 2500;
animation: fadeIn 0.5s;
}
.notification.error {
background-color: #dc3545;
}
/* Login Modal Styles */
.login-modal {
display: block;
position: fixed;
z-index: 3000;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0,0,0,0.9);
}
.login-content {
background-color: #fefefe;
margin: 10% auto;
padding: 20px;
border: 1px solid #888;
width: 80%;
max-width: 400px;
border-radius: 8px;
animation: fadeIn 0.5s;
text-align: center;
}
.login-content input {
width: 90%;
padding: 10px;
margin: 10px 0;
border-radius: 5px;
border: 1px solid #ccc;
}
.login-content button {
background-color: #007BFF;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.login-content button:hover {
background-color: #0056b3;
}
/* Secret Content Styles */
.secret {
display: none;
background-color: #111;
color: #fff;
padding: 20px;
margin-top: 20px;
border-radius: 5px;
position: relative;
}
.secret::before {
content: "TOP SECRET";
position: absolute;
top: -10px;
left: 10px;
background: #990000;
padding: 5px;
border-radius: 3px;
font-size: 0.9em;
color: #fff;
}
/* Hidden Easter Egg Button */
#easter-egg-btn {
display: none;
}
</style>
<script>
// Anti-Inspection Mechanisms
(function() {
// Disable right-click
document.addEventListener('contextmenu', function(e) {
e.preventDefault();
triggerTermination();
});
// Detect specific key combinations
document.addEventListener('keydown', function(e) {
if (
e.key === 'F12' ||
(e.ctrlKey && e.shiftKey && (e.key === 'I' || e.key === 'C' || e.key === 'J')) ||
(e.ctrlKey && e.key === 'U')
) {
e.preventDefault();
triggerTermination();
}
});
// Function to simulate termination
function triggerTermination() {
// Close admin modal if open
document.getElementById('adminModal').style.display = 'none';
document.getElementById('admin-password').value = '';
// Close login modal if open
document.getElementById('loginModal').style.display = 'none';
document.getElementById('login-username').value = '';
document.getElementById('login-password').value = '';
// Hide admin dashboard if visible
document.getElementById('adminDashboard').classList.remove('active');
// Hide main content
document.getElementById('mainContent').style.display = 'none';
// Hide admin button
document.querySelector('.admin-button').style.display = 'none';
// Display termination modal
document.getElementById('terminationModal').style.display = 'block';
// Play termination sound
var audio = new Audio('termination.mp3');
audio.play();
}
// Function to prevent copying
document.addEventListener('copy', function(e) {
e.preventDefault();
triggerTermination();
});
// Function to prevent dragging
document.addEventListener('dragstart', function(e) {
e.preventDefault();
triggerTermination();
});
// Function to monitor for developer tools
var devtoolsOpen = false;
var threshold = 160;
setInterval(function() {
var widthThreshold = window.outerWidth - window.innerWidth > threshold;
var heightThreshold = window.outerHeight - window.innerHeight > threshold;
if (widthThreshold || heightThreshold) {
if (!devtoolsOpen) {
devtoolsOpen = true;
triggerTermination();
}
} else {
devtoolsOpen = false;
}
}, 1000);
// Obfuscate critical functions
window.validateLogin = function() {
// Login Functionality
var _0x1a3b = document.getElementById('login-username').value;
var _0x1a3c = document.getElementById('login-password').value;
var _0x1a3d = 'agent'; // Username
var _0x1a3e = 'Vanguard$2024'; // Password
if (_0x1a3b === _0x1a3d && _0x1a3c === _0x1a3e) {
document.getElementById('loginModal').style.display = 'none';
showContent();
showNotification('Login successful.', false);
} else {
loginAttempts++;
if (loginAttempts >= maxLoginAttempts) {
triggerTermination();
}
showNotification('Incorrect credentials. Access denied.', true);
}
};
window.validateAdmin = function() {
// Admin Login Functionality
var _0x2b4d = document.getElementById('admin-password').value;
var _0x2b4e = 'OmegaSecure$2025'; // Admin Password
if (_0x2b4d === _0x2b4e) {
closeAdminModal();
showAdminDashboard();
showNotification('Admin access granted.', false);
} else {
showNotification('Incorrect admin password. Access denied.', true);
}
};
// Hide functions from Function.toString()
Function.prototype.toString = function() {
return '[Function]';
};
})();
// Login Functionality
let loginAttempts = 0;
const maxLoginAttempts = 3;
// Show Content After Login
function showContent() {
document.querySelector('.protection').style.display = 'none';
document.getElementById('mainContent').style.display = 'block';
document.querySelector('.admin-button').style.display = 'block';
}
// Admin Functions
function openAdminModal() {
document.getElementById('adminModal').style.display = 'block';
}
function closeAdminModal() {
document.getElementById('adminModal').style.display = 'none';
document.getElementById('admin-password').value = '';
}
function showAdminDashboard() {
document.getElementById('adminDashboard').classList.add('active');
}
// Notification Function
function showNotification(message, isError) {
const notification = document.getElementById('notification');
notification.textContent = message;
if (isError) {
notification.classList.add('error');
} else {
notification.classList.remove('error');
}
notification.style.display = 'block';
setTimeout(() => {
notification.style.display = 'none';
}, 3000);
}
// Redacted Content Reveal
function revealAllRedacted() {
const redactedElements = document.querySelectorAll('.redacted');
redactedElements.forEach(elem => {
elem.style.backgroundColor = '#f9f9f9';
elem.style.color = '#000';
const revealText = elem.getAttribute('data-reveal');
elem.textContent = revealText;
elem.style.cursor = 'default';
elem.removeAttribute('data-reveal');
elem.removeEventListener('click', revealRedacted);
});
showNotification("All redacted content has been revealed.", false);
}
function revealRedacted(event) {
const revealText = event.target.getAttribute('data-reveal');
if (revealText) {
event.target.textContent = revealText;
event.target.style.backgroundColor = '#f9f9f9';
event.target.style.color = '#000';
event.target.style.cursor = 'default';
event.target.removeAttribute('data-reveal');
event.target.removeEventListener('click', revealRedacted);
// Secret Easter Egg Activation
if (revealText === 'Project AEGIS') {
document.getElementById('easter-egg-btn').style.display = 'block';
}
}
}
// Add New Section
function addNewSection() {
const sectionId = document.getElementById('new-section-id').value.trim();
const sectionContent = document.getElementById('new-section-content').value.trim();
if (sectionId && sectionContent) {
const newSection = document.createElement('section');
newSection.id = sectionId;
newSection.innerHTML = sectionContent;
document.getElementById('mainContent').appendChild(newSection);
showNotification("New section added successfully.", false);
document.getElementById('new-section-id').value = '';
document.getElementById('new-section-content').value = '';
} else {
showNotification("Please provide both Section ID and Content.", true);
}
}
// Toggle Hidden Content
function toggleContent(id) {
const content = document.getElementById(id);
const button = document.getElementById(`btn-${id}`);
if (content.classList.contains('expanded')) {
content.classList.remove('expanded');
button.textContent = 'Show More';
} else {
content.classList.add('expanded');
button.textContent = 'Show Less';
}
}
// Confirm Redirect
function confirmRedirect(url) {
if (confirm("You are about to leave the secure environment. Continue?")) {
window.location.href = url;
}
}
// Secret Easter Egg Function
function activateEasterEgg() {
document.getElementById('secret-content').style.display = 'block';
showNotification("Secret content unlocked.", false);
}
// Initialize
document.addEventListener('DOMContentLoaded', () => {
// Hide content until login
document.getElementById('mainContent').style.display = 'none';
document.querySelector('.admin-button').style.display = 'none';
// Attach event listeners to redacted elements
const redactedElements = document.querySelectorAll('.redacted');
redactedElements.forEach(elem => {
elem.addEventListener('click', revealRedacted);
});
// Hide termination modal if exists
const terminationModal = document.getElementById('terminationModal');
if (terminationModal) {
terminationModal.style.display = 'none';
}
// Attach event listener to Easter Egg button
const easterEggBtn = document.getElementById('easter-egg-btn');
if (easterEggBtn) {
easterEggBtn.addEventListener('click', activateEasterEgg);
}
});
</script>
</head>
<body>
<!-- Protection Notice -->
<div class="protection">
This site is protected by the SCP Foundation's security protocols. <a href="https://scp-wiki.wikidot.com/" target="_blank">Learn more.</a>
</div>
<!-- Login Modal -->
<div id="loginModal" class="login-modal">
<div class="login-content">
<h2>Access Restricted</h2>
<p>Please enter your credentials to view the classified document.</p>
<input type="text" id="login-username" placeholder="Username">
<input type="password" id="login-password" placeholder="Password">
<button onclick="validateLogin()">Login</button>
</div>
</div>
<!-- Termination Modal -->
<div id="terminationModal" class="modal">
<div class="modal-content">
<h2>Termination Protocols Engaged</h2>
<p>You have been terminated. All access privileges have been revoked.</p>
<button onclick="window.close()">Exit</button>
</div>
</div>
<!-- Admin Button -->
<button class="admin-button" onclick="openAdminModal()">Admin Login</button>
<!-- Admin Login Modal -->
<div id="adminModal" class="modal">
<div class="modal-content">
<span class="close" onclick="closeAdminModal()">×</span>
<h2>Admin Login</h2>
<p>Enter your administrative password to continue.</p>
<input type="password" id="admin-password" placeholder="Password">
<button onclick="validateAdmin()">Submit</button>
</div>
</div>
<!-- Notification -->
<div id="notification" class="notification"></div>
<!-- Admin Dashboard -->
<div id="adminDashboard" class="admin-dashboard container">
<h1>Admin Dashboard</h1>
<section class="admin-section">
<h2>Reveal All Redacted Content</h2>
<button onclick="revealAllRedacted()">Reveal Redactions</button>
</section>
<section class="admin-section">
<h2>Edit Content</h2>
<label for="section-id">Section ID:</label>
<input type="text" id="section-id" placeholder="e.g., personnel-composition">
<label for="new-content">New Content:</label>
<textarea id="new-content" rows="4" placeholder="Enter new HTML content"></textarea>
<button onclick="updateContent(document.getElementById('section-id').value, document.getElementById('new-content').value)">Update Section</button>
</section>
<section class="admin-section">
<h2>Add New Section</h2>
<label for="new-section-id">New Section ID:</label>
<input type="text" id="new-section-id" placeholder="e.g., new-section">
<label for="new-section-content">Content HTML:</label>
<textarea id="new-section-content" rows="6" placeholder="Enter HTML content for the new section"></textarea>
<button onclick="addNewSection()">Add Section</button>
</section>
</div>
<!-- Main Content -->
<div id="mainContent" class="container">
<!-- [Your main content goes here as in your original code] -->
<!-- For brevity, I'm not repeating the entire content here -->
</div>
<div class="footer">
© SCP Foundation | All Rights Reserved
</div>
</body>
</html>
These changes ensure that when a termination event occurs, all other interfaces close, and the user is clearly informed that they have been terminated.