function mb_age_warning_confirm() {
localStorage.mb_age_warning_verified = "1";
document.getElementById("mb_age_warning").remove();
document.body.style.overflow = "";
document.body.style.background = "";
}
function mb_age_warning() {
var pageTitle = document.title;
var metaDescription = document.querySelector("meta[name='description']");
var descriptionContent = "";
if (metaDescription) {
descriptionContent = metaDescription.getAttribute("content");
}
var ageWarningHTML = `
${pageTitle}
You must be 18 years of age or older to continue.
${descriptionContent}
`;
document.body.style.overflow = "hidden";
document.body.style.background = "rgba(0, 0, 0, 0.8)";
document.body.insertAdjacentHTML("beforeend", ageWarningHTML);
document.getElementById("mb_age_warning").style.backdropFilter = "blur(16px)";
document.getElementById("mb_age_warning_content").style.backgroundColor = "black";
function checkOverflow() {
var warningContentHeight = document.getElementById("mb_age_warning_content").offsetHeight;
var windowHeight = window.innerHeight;
if (warningContentHeight > windowHeight) {
document.getElementById("mb_age_warning").style.overflowY = "scroll";
} else {
document.getElementById("mb_age_warning").style.overflowY = "auto";
}
}
window.addEventListener("resize", function() {
checkOverflow();
});
checkOverflow();
document.getElementById("bing-link").setAttribute("rel", "nofollow");
}
window.addEventListener("DOMContentLoaded", function() {
if (localStorage.mb_age_warning_verified === undefined) {
mb_age_warning();
}
});