function mb_age_warning_confirm() { localStorage.mb_age_warning_verified = "1"; document.getElementById("mb_age_warning").remove(); document.body.style.overflow = ""; // Restores default scrolling behavior document.body.style.background = ""; // Restores default page background } /* edit below if you want to change the 18+ text */ function mb_age_warning() { var pageTitle = document.title; // Get the current page title var ageWarningHTML = `

${pageTitle}


You must be 18 years of age or older to continue.




Leave

`; document.body.style.overflow = "hidden"; // Hides page scrolling document.body.style.background = "rgba(0, 0, 0, 0.8)"; // Sets page background to black color document.body.style.position = "relative"; document.body.insertAdjacentHTML("beforeend", ageWarningHTML); // Adds background blur effect document.getElementById("mb_age_warning").style.backdropFilter = "blur(16px)"; // Adds black background only to the information box document.getElementById("mb_age_warning_content").style.backgroundColor = "black"; // Checks if the content of the box fits within the screen 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(); // Adds rel="nofollow" to the link document.getElementById("bing-link").setAttribute("rel", "nofollow"); } window.addEventListener("DOMContentLoaded", function() { if (localStorage.mb_age_warning_verified === undefined) { mb_age_warning(); } });