More forcefully redirect Zulip users to staging.

(imported from commit e9ed69008c198da6f5af74a85e0af73f3f49bb6f)
This commit is contained in:
Waseem Daher 2014-07-08 21:27:26 -07:00
parent 0ea54a043e
commit 203c04fdb8
1 changed files with 14 additions and 0 deletions

View File

@ -26,6 +26,20 @@
<a href="https://staging.zulip.com/">staging.zulip.com</a>
to be part of the conversation.</p>
</div>
<script>
$(function () {
if (window.bridge !== undefined) {
// Desktop app only supports "prompt", not "alert" or "confirm" :/
if (window.prompt("You're currently on the production Zulip server, but everyone else is on the staging server.\n\nPress OK to be redirected there now.\n\nGoing forward, please run Zulip with the following flag to use the staging server:", "--site https://staging.zulip.com") !== null) {
window.location.assign("https://staging.zulip.com");
}
} else {
if (window.confirm("You're currently on the production Zulip server, but everyone else is on the staging server. Please use https://staging.zulip.com to use Zulip.\n\nPress OK to be redirected there now.")) {
window.location.assign("https://staging.zulip.com");
}
}
});
</script>
{% endif %}
<div class="alert alert_sidebar alert-error home-error-bar" id="reloading-application"></div>
{% if enable_feedback %}