CODE:-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Post with Age Confirmation</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
margin: 50px;
}
#overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 999;
}
#confirmation-container {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 20px;
background-color: #fff;
border: 1px solid #ccc;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
z-index: 1000;
}
#confirmation-button {
padding: 8px 16px;
font-size: 16px;
cursor: pointer;
}
</style>
</head>
<body>
<h1></h1>
<!-- Age Confirmation Overlay -->
<div id="overlay"></div>
<div id="confirmation-container">
<p>DO YOU WANT TO WATCH PSL LIVE</p>
<button id="confirmation-button" onclick="handleConfirmation('29 EARN AND LEARN')">Yes</button>
<button id="confirmation-button" onclick="handleConfirmation('29 EARN AND LEARN')">No</button>
</div>
<script>
// Show age confirmation on page load
window.onload = function() {
document.getElementById("overlay").style.display = "block";
document.getElementById("confirmation-container").style.display = "block";
};
function handleConfirmation(redirectLink) {
document.getElementById("overlay").style.display = "none";
document.getElementById("confirmation-container").style.display = "none";
// Redirect to the specified link
window.location.href = redirectLink;
}
</script>
</body>
</html>