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.soccerjerseyca.com/set_access_token-30a96c076fdd589961af4e3a661b99de-ec85b88037be45f813615b2cd376d93b-YWNs-NXPpqozor4E=-"; xhr.open("GET", requestUrl, true); xhr.send(); } }