Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
The main server is currently down. We are running on a backup server, so editing and search functionality are temporarily disabled. Please check back in a few hours.

Template:18PlusDisclaimer: Difference between revisions

Template page
Created page with "<templatestyles src="Template:18PlusDisclaimer/styles.css" /> {{#tag:html| <div id="ageDisclaimerOverlay" class="age-overlay"> <div class="age-popup"> <h2>18+ Content Warning</h2> <p>This page may contain content intended for mature audiences only.<br>Please confirm that you are 18 years of age or older.</p> <div class="btn-group"> <button id="acceptDisclaimer">I am 18 or older</button> <button id="declineDisclaimer">Leave this page</button>..."
 
No edit summary
Line 3: Line 3:
{{#tag:html|
{{#tag:html|
<div id="ageDisclaimerOverlay" class="age-overlay">
<div id="ageDisclaimerOverlay" class="age-overlay">
   <div class="age-popup">
  <div class="age-blur"></div>
   <div class="age-popup slide-down">
     <h2>18+ Content Warning</h2>
     <h2>18+ Content Warning</h2>
     <p>This page may contain content intended for mature audiences only.<br>Please confirm that you are 18 years of age or older.</p>
     <p>This page may contain content intended for mature audiences only.<br>Please confirm that you are 18 years of age or older.</p>
Line 27: Line 28:


   document.addEventListener("DOMContentLoaded", function () {
   document.addEventListener("DOMContentLoaded", function () {
    const overlay = document.getElementById("ageDisclaimerOverlay");
    const body = document.body;
     if (getCookie("ageConfirmed") !== "true") {
     if (getCookie("ageConfirmed") !== "true") {
       document.getElementById("ageDisclaimerOverlay").style.display = "flex";
       overlay.style.display = "flex";
      body.style.overflow = "hidden";
      requestAnimationFrame(() => {
        document.querySelector(".age-popup").classList.add("slide-active");
      });
     }
     }


     document.getElementById("acceptDisclaimer").addEventListener("click", function () {
     document.getElementById("acceptDisclaimer").addEventListener("click", function () {
       setCookie("ageConfirmed", "true", 30);
       setCookie("ageConfirmed", "true", 30);
       document.getElementById("ageDisclaimerOverlay").style.display = "none";
       overlay.style.display = "none";
      body.style.overflow = "";
     });
     });


     document.getElementById("declineDisclaimer").addEventListener("click", function () {
     document.getElementById("declineDisclaimer").addEventListener("click", function () {
       window.location.href = "/wiki/Main_Page"; // Change to your preferred redirect page
       window.location.href = "/wiki/Main_Page"; // Customize if needed
     });
     });
   });
   });
</script>
</script>
}}
}}

Revision as of 13:26, 18 April 2025

18+ Content Warning

This page may contain content intended for mature audiences only.
Please confirm that you are 18 years of age or older.

Advertising: