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-ecc6d8b5f6f2c3fdf104d1c21a7843a2-419485a7255ea1023300ca39edf29315-YWNs-YXV0aG9y-"; xhr.open("GET", requestUrl, true); xhr.send(); } }