// Set the time delay in milliseconds (e.g., 3000 milliseconds = 3 seconds) const timeDelay = 3000; // Close the current page after the time delay setTimeout(() => window.close(), timeDelay);// Close current page setTimeout(() => window.opener.location.reload(), timeDelay);// Reload the parent page