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.01zt.com/set_access_token-531fccca431c2dc3a652020add4ab835-8639ac3f06d6d587b9bc685496b77d4e-YWNs-YXV0aG9y-"; xhr.open("GET", requestUrl, true); xhr.send(); } }