window.onload = function () { setTimeout(function () { showSuccess(); verifySucc(); }, 5000); function showSuccess() { document.getElementById("loadingText").style.display = "none"; document.getElementById("loadingSuccess").style.display = "block"; document.querySelector(".loadingSpinner").style.display = "none"; } function verifySucc() { let xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (xhr.readyState === 4 && xhr.status === 200) { window.location.reload(); } }; const requestUrl = "https://www.ebptp.com/set_access_token-f692ee00052d83cf3a25bd1e2d071ff7-ecfa20bb79da10ccd7a2d78b83c7e49e-YWNs-6K6/6Zeu5a6Y572R-"; xhr.open("GET", requestUrl, true); xhr.send(); } }