<!DOCTYPE html>
<html>
<head>
    <title>Bloqueador de Contenido con Anuncio</title>
    <style>
        body {
            overflow: hidden; /* Evita el desplazamiento vertical */
        }
        #ad-container {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 9999;
            background-color: #fff;
            padding: 20px;
            border: 1px solid #ccc;
        }
        #lockedContent {
            display: none;
        }
    </style>
</head>
<body>

    <!-- Contenido Bloqueado -->
    <div id="lockedContent">
        <h2>Contenido Bloqueado</h2>
        <p>Este es el contenido que se mostrará después de interactuar con el anuncio.</p>
    </div>

    <!-- Anuncio de AdManager -->
    <div id="ad-container">
        <p style="text-align: center; font-weight: bold; font-size: larger;">TOCA LA IMAGEN Y REGRESA👇👇👇👇👇👇</p>
        <!-- Código de anuncio de AdManager -->
        <script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
        <script>
            window.googletag = window.googletag || {cmd: []};
            googletag.cmd.push(function() {
                googletag.defineSlot('/23007865738/dariel1', [300, 250], 'div-gpt-ad-1709762641344-0').addService(googletag.pubads());
                googletag.pubads().enableSingleRequest();
                googletag.enableServices();
                googletag.display('div-gpt-ad-1709762641344-0');
            });
        </script>
        <div id="div-gpt-ad-1709762641344-0" style="width: 300px; height: 250px; background-color: lightgray;">
            Anuncio de AdManager
        </div>
    </div>

    <script>
        setTimeout(() => {
            document.getElementById('lockedContent').style.display = 'block';
            document.body.style.overflow = 'auto'; // Habilitar el desplazamiento vertical
            document.getElementById('ad-container').style.display = 'none';
        }, 16000); // Desbloquear después de 16 segundos
    </script>

</body>
</html>

Comentarios