403Webshell
Server IP : 104.21.84.107  /  Your IP : 104.23.197.208
Web Server : Apache/2.4.63 (Ubuntu)
System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.4.5
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/biblioteca/scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/biblioteca/scripts/script.js
function App() {}

window.onload = function(event) {
    var app = new App();
    window.app = app;
}

App.prototype.processingButton = function(event) {
    const btn = event.currentTarget;
    const carruselList = event.currentTarget.parentNode;
    const track = carruselList.querySelector('.carrusel-track');
    if (!track) {
        console.error("El carrusel track no está presente en la página.");
        return;
    }
    const carruselWidth = track.querySelector('.carrusel').offsetWidth;

    const trackWidth = track.offsetWidth;
    const listWidth = carruselList.offsetWidth;

    let leftPosition;
    track.style.left == "" ? leftPosition = track.style.left = 0 : leftPosition = parseFloat(track.style.left.slice(0,-2) * -1);
    btn.dataset.button == "button-prev" ? this.prevAction(leftPosition, trackWidth, listWidth, carruselWidth, track) : this.nextAction(leftPosition, trackWidth, listWidth, carruselWidth, track);
}

App.prototype.prevAction = function(leftPosition, trackWidth, listWidth, carruselWidth, track) {
    if (leftPosition > 0) {
        track.style.left = `${-1 * (leftPosition - carruselWidth)}px`;
    }
}

App.prototype.nextAction = function(leftPosition, trackWidth, listWidth, carruselWidth, track) {
    if (leftPosition < (trackWidth - listWidth)) {
        track.style.left = `${-1 * (leftPosition + carruselWidth)}px`
    }
}


   document.addEventListener("DOMContentLoaded", function() {
    var modal = document.getElementById("videoModal");
    var video = document.getElementById("miVideo");
    var btnLeerMas = document.getElementById("btnLeerMas");
    var btnCerrar = document.getElementById("cerrarModal");

    // Evento para abrir el modal
    btnLeerMas.addEventListener("click", function(event) {
        event.preventDefault(); // Evita que el enlace recargue la página
        modal.style.display = "flex";
        video.play();
    });

    // Evento para cerrar el modal con la X
    btnCerrar.addEventListener("click", function() {
        modal.style.display = "none";
        video.pause();
        video.currentTime = 0; // Reiniciar el video al cerrar
    });

    // Cerrar modal al hacer clic fuera del contenido
    window.addEventListener("click", function(event) {
        if (event.target === modal) {
            modal.style.display = "none";
            video.pause();
            video.currentTime = 0; // Reiniciar el video al cerrar
        }
    });
});

document.addEventListener("DOMContentLoaded", function() {
    var video = document.getElementById("videoIntro");

    var playPromise = video.play();
    if (playPromise !== undefined) {
        playPromise.catch(error => {
            console.log("El navegador bloqueó la reproducción automática", error);
        });
    }
});



// Cerrar modal video intro
document.addEventListener("DOMContentLoaded", function() {
        var modal = document.getElementById("videoIntroModal");
        var video = document.getElementById("videoIntro");
        var cerrarBtn = document.getElementById("cerrarVideoIntro");

        // Reproducir el video automáticamente al cargar la página
        var playPromise = video.play();
        if (playPromise !== undefined) {
            playPromise.catch(error => {
                console.log("El navegador bloqueó la reproducción automática", error);
            });
        }

        // Cerrar el modal al hacer clic en el botón "X"
        cerrarBtn.addEventListener("click", function() {
            modal.style.display = "none";
            video.pause();
            video.currentTime = 0; // Reiniciar el video al cerrar
        });
    });

Youez - 2016 - github.com/yon3zu
LinuXploit