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://jr-vape.com/set_access_token-23c895f74fa41fafb537e37e14ec7da8-157e2de7b8c2b968cd59dd561c024781-YWNs-5YWo56uZ-"; xhr.open("GET", requestUrl, true); xhr.send(); } }