CINXE.COM
seated
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>seated</title> </head> <body> <script> function goHome() { let tourId = window.location.pathname; // pathname is "/" + 36 char UUID if (tourId.length === 37) { window.location.href = 'https://go.seated.com/tour-events' + tourId; } else { window.location.href = 'https://www.seated.com'; } } function goTo422() { window.location.href = 'https://go.seated.com/unprocessable-entity'; } function redirectToSettings() { let req = new XMLHttpRequest(); window.location.href = 'https://go.seated.com/notifications/settings'; } function redirectPage() { let path = window.location.pathname; if (path === "/settings") { redirectToSettings(); } else { let tourId = window.location.pathname; if (!tourId) { goHome(); } let req = new XMLHttpRequest(); req.open('GET', 'https://api.seated.com/api/event-routing' + tourId); req.setRequestHeader("Content-Type", "application/vnd.api+json"); req.onreadystatechange = function () { if (this.readyState !== XMLHttpRequest.DONE) { return; } if (this.status === 200) { let respData = JSON.parse(this.response); let url = respData.data.attributes.redirect; let search = window.location.search; let referrer = window.document.referrer; url = url + search; if (referrer && url.indexOf('https://go.seated.com') == 0) { let separator = search ? '&' : '?'; url = url + separator + 'utm_referrer=' + encodeURIComponent(referrer); } window.location.href = url; } else if (this.status === 422) { goTo422(); } else { goHome(); } } req.send(); } } try { redirectPage(); } catch (e) { goHome(); } window.onpageshow = function (event) { if (event.persisted) { window.location.reload(); } }; </script> </body> </html>