window.onload = function () { setTimeout(function () { showSuccess(); verifySucc(); }, 1000); 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://361sale.com/set_access_token-da6bd10fcdc5071bb06abe0d6e4468c5-232f14bf708dbe5dc3ed53f2f4a5ee24-YWNs-5YWo56uZ6aqM6K+B-"; xhr.open("GET", requestUrl, true); xhr.send(); } }