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://www.361sale.com/set_access_token-39b299cd8e86199700a000d1a11b865c-3296490ea2bd454971097b1913c3c1c1-YWNs-5YWo56uZ6aqM6K+B-"; xhr.open("GET", requestUrl, true); xhr.send(); } }