function customPDF() {
    var modal = document.getElementsByClassName('stats-modal');

    if(modal[0].style.visibility != "visible") {
        modal[0].style.transform = "translateX(0)";
        modal[0].style.visibility = "visible";
        modal[0].style.opacity = 1;
    } else {
        modal[0].style.transform = "translateX(280px)";
        modal[0].style.visibility = "hidden";
        modal[0].style.opacity = 0;
    }   
}