Skip to content
- Choosing a selection results in a full page refresh.
- Opens in a new window.
document.addEventListener('DOMContentLoaded', function() {
// Check if user already accepted
if(localStorage.getItem('ageWarningAccepted') === 'true') return;
// Create overlay
var overlay = document.createElement('div');
overlay.id = 'content-warning';
overlay.style.position = 'fixed';
overlay.style.top = '0';
overlay.style.left = '0';
overlay.style.width = '100%';
overlay.style.height = '100%';
overlay.style.background = 'rgba(0,0,0,0.95)';
overlay.style.color = '#fff';
overlay.style.zIndex = '9999';
overlay.style.display = 'flex';
overlay.style.flexDirection = 'column';
overlay.style.alignItems = 'center';
overlay.style.justifyContent = 'center';
overlay.style.textAlign = 'center';
overlay.style.padding = '20px';
overlay.style.fontFamily = 'Arial, sans-serif';
overlay.style.opacity = '0';
overlay.style.transition = 'opacity 0.6s ease';
// Add content
overlay.innerHTML = `
WARNING
This bookstore contains NUDITY and material which may OFFEND.
`;
// Append to body
document.body.appendChild(overlay);
// Fade in overlay
setTimeout(function() {
overlay.style.opacity = '1';
}, 50);
// Button hover effect
var button = document.getElementById('enter-button');
button.addEventListener('mouseover', function() {
button.style.backgroundColor = '#000';
button.style.color = '#fff';
});
button.addEventListener('mouseout', function() {
button.style.backgroundColor = '#fff';
button.style.color = '#000';
});
// Button click: fade out overlay
button.onclick = function() {
overlay.style.opacity = '0';
setTimeout(function() {
overlay.style.display = 'none';
localStorage.setItem('ageWarningAccepted', 'true');
}, 600);
};
});